2 Commits

Author SHA1 Message Date
vms
72e9311c97 getting rid of excess imports
since https://github.com/rust-lang/rust/issues/63562 fixed
2020-04-29 00:24:20 +03:00
vms
8960e72d3b update to the latest ABI 2020-04-28 21:58:11 +03:00
2 changed files with 14 additions and 13 deletions

View File

@ -9,12 +9,7 @@ EXPORT_FUNCS = \
--export=deallocate,$\ --export=deallocate,$\
--export=invoke,$\ --export=invoke,$\
--export=load,$\ --export=load,$\
--export=store,$\ --export=store
--export=sqlite_allocate,$\
--export=sqlite_deallocate,$\
--export=sqlite_invoke,$\
--export=sqlite_load,$\
--export=sqlite_store
SQLITE_SRC = \ SQLITE_SRC = \
src/alter.c\ src/alter.c\
src/analyze.c\ src/analyze.c\
@ -128,8 +123,7 @@ SQLITE_FLAGS = \
-DSQLITE_ENABLE_OFFSET_SQL_FUNC\ -DSQLITE_ENABLE_OFFSET_SQL_FUNC\
-DSQLITE_ENABLE_DESERIALIZE\ -DSQLITE_ENABLE_DESERIALIZE\
-DSQLITE_INTROSPECTION_PRAGMAS\ -DSQLITE_INTROSPECTION_PRAGMAS\
-DSQLITE_OMIT_POPEN\ -DSQLITE_OMIT_POPEN
-DLOG_ENABLED
.PHONY: default all clean .PHONY: default all clean

View File

@ -15,6 +15,14 @@ int init() {
int g_isInited = 0; 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) { void* allocate(size_t size) {
return malloc(size + 1); return malloc(size + 1);
} }
@ -36,9 +44,9 @@ char *write_response(char *response, int response_size) {
typedef struct ShellText ShellText; typedef struct ShellText ShellText;
struct ShellText { struct ShellText {
char *z; char *z;
int n; int n;
int nAlloc; int nAlloc;
}; };
static void initText(ShellText *p){ static void initText(ShellText *p){
@ -112,7 +120,7 @@ const char *invoke(char *request, int request_size) {
init(); init();
#if LOG_ENABLED #if LOG_ENABLED
const char successInitMessage[] = "Sqlite has been initialized"; const char successInitMessage[] = "Sqlite has been initialized\n";
log_utf8_string(successInitMessage, sizeof(successInitMessage)); log_utf8_string(successInitMessage, sizeof(successInitMessage));
#endif #endif
@ -149,4 +157,3 @@ const char *invoke(char *request, int request_size) {
return response; return response;
} }