File tree 8 files changed +66
-7
lines changed
8 files changed +66
-7
lines changed Original file line number Diff line number Diff line change
1
+ BasedOnStyle : Google
2
+ IndentWidth : 4
3
+ ColumnLimit : 100
4
+ AllowShortFunctionsOnASingleLine : None
5
+ KeepEmptyLinesAtTheStartOfBlocks : false
6
+ AlignConsecutiveMacros : true
7
+ BreakBeforeBraces : Allman
Original file line number Diff line number Diff line change 35
35
cd tidesdb
36
36
cmake -DTIDESDB_WITH_SANITIZER=OFF --debug-output -S . -B build && make -C build/
37
37
sudo cmake --install build
38
+ sudo ldconfig
38
39
39
40
40
41
- name : Install Lua and Lua development files
Original file line number Diff line number Diff line change @@ -42,3 +42,8 @@ luac.out
42
42
# cmake build artifacts
43
43
build
44
44
45
+ cmake-build-debug
46
+ .idea
47
+ build
48
+ .vscode
49
+
Original file line number Diff line number Diff line change @@ -5,11 +5,13 @@ set(CMAKE_C_STANDARD 23)
5
5
set (PROJECT_VERSION 0.1.0)
6
6
add_compile_options (-Wextra -Wall)
7
7
8
- find_package (Lua 5.3 REQUIRED)
8
+ # set CMP0156 policy
9
+ cmake_policy (SET CMP0156 NEW)
10
+
11
+ find_library (LIBRARY_TIDEDB NAMES tidesdb REQUIRED) # require tidesdb library
9
12
10
- find_library (LIBRARY_TIDEDB NAMES tidesdb )
13
+ find_package (Lua 5.3 REQUIRED )
11
14
12
15
add_library (tidesdb_lua SHARED tidesdb-lua.c)
13
16
target_include_directories (tidesdb_lua PRIVATE ${LUA_INCLUDE_DIR} )
14
- target_link_libraries (tidesdb_lua ${LIBRARY_TIDEDB} )
15
- target_link_libraries (tidesdb_lua ${LUA_LIBRARIES} )
17
+ target_link_libraries (tidesdb_lua ${LUA_LIBRARIES} tidesdb)
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Before submitting a PR, run this script to format the source code.
4
+
5
+ EXCLUDE_DIRS=" external\|cmake-build-debug\|.idea|build|cmake"
6
+
7
+ find . -type f -name " *.c" -o -name " *.h" | grep -v " $EXCLUDE_DIRS " | xargs clang-format -i
Original file line number Diff line number Diff line change
1
+ --[[
2
+ *
3
+ * Copyright (C) TidesDB
4
+ *
5
+ * Original Author: Evgeny Kornev
6
+ *
7
+ * Licensed under the Mozilla Public License, v. 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * https://www.mozilla.org/en-US/MPL/2.0/
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ *
19
+ ]]
1
20
package.cpath = ' tidesdb-lua/build/?.so;build/?.so;' .. package.cpath
2
21
3
22
describe (" load" , function ()
Original file line number Diff line number Diff line change
1
+ --[[
2
+ *
3
+ * Copyright (C) TidesDB
4
+ *
5
+ * Original Author: Evgeny Kornev
6
+ *
7
+ * Licensed under the Mozilla Public License, v. 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * https://www.mozilla.org/en-US/MPL/2.0/
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ *
19
+ ]]
1
20
local lib = require (" libtidesdb_lua" )
2
21
3
22
local code , message
Original file line number Diff line number Diff line change 1
1
/*
2
2
*
3
- * Copyright (C) Evgeny Kornev
3
+ * Copyright (C) TidesDB
4
4
*
5
5
* Original Author: Evgeny Kornev
6
6
*
16
16
* See the License for the specific language governing permissions and
17
17
* limitations under the License.
18
18
*/
19
-
20
19
#include <lua.h>
21
20
#include <lauxlib.h>
22
21
#include <lualib.h>
23
22
#include <stdio.h>
24
23
#include <string.h>
25
- #include <tidesdb.h>
24
+ #include <tidesdb/tidesdb .h>
26
25
27
26
#define LUA_RET_CODE () \
28
27
if(ret) \
You can’t perform that action at this time.
0 commit comments