mirror of
https://github.com/fluencelabs/sqlite
synced 2025-07-04 18:21:38 +00:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
72e9311c97 | |||
8960e72d3b |
10
Makefile
10
Makefile
@ -9,12 +9,7 @@ EXPORT_FUNCS = \
|
||||
--export=deallocate,$\
|
||||
--export=invoke,$\
|
||||
--export=load,$\
|
||||
--export=store,$\
|
||||
--export=sqlite_allocate,$\
|
||||
--export=sqlite_deallocate,$\
|
||||
--export=sqlite_invoke,$\
|
||||
--export=sqlite_load,$\
|
||||
--export=sqlite_store
|
||||
--export=store
|
||||
SQLITE_SRC = \
|
||||
src/alter.c\
|
||||
src/analyze.c\
|
||||
@ -128,8 +123,7 @@ SQLITE_FLAGS = \
|
||||
-DSQLITE_ENABLE_OFFSET_SQL_FUNC\
|
||||
-DSQLITE_ENABLE_DESERIALIZE\
|
||||
-DSQLITE_INTROSPECTION_PRAGMAS\
|
||||
-DSQLITE_OMIT_POPEN\
|
||||
-DLOG_ENABLED
|
||||
-DSQLITE_OMIT_POPEN
|
||||
|
||||
.PHONY: default all clean
|
||||
|
||||
|
@ -15,6 +15,14 @@ int init() {
|
||||
|
||||
int g_isInited = 0;
|
||||
|
||||
void store(char *ptr, unsigned char byte) {
|
||||
*ptr = byte;
|
||||
}
|
||||
|
||||
unsigned char load(const unsigned char *ptr) {
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
void* allocate(size_t size) {
|
||||
return malloc(size + 1);
|
||||
}
|
||||
@ -112,7 +120,7 @@ const char *invoke(char *request, int request_size) {
|
||||
init();
|
||||
|
||||
#if LOG_ENABLED
|
||||
const char successInitMessage[] = "Sqlite has been initialized";
|
||||
const char successInitMessage[] = "Sqlite has been initialized\n";
|
||||
log_utf8_string(successInitMessage, sizeof(successInitMessage));
|
||||
#endif
|
||||
|
||||
@ -149,4 +157,3 @@ const char *invoke(char *request, int request_size) {
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user