6 Commits

Author SHA1 Message Date
19d85ba7a5 Merge pull request #5 from fluencelabs/fix_bwu
fix BWU compatibility
2021-09-03 17:43:33 +03:00
e7c772cfb6 Merge pull request #4 from fluencelabs/fix_xdel
Use hardcoded free instead of xDel
2021-09-03 17:13:59 +03:00
vms
807d6ff47d fix of fix 2021-09-03 13:50:33 +03:00
vms
5b9324916d fix BWU compatibility 2021-09-03 13:49:23 +03:00
vms
71080d772d fix 2021-09-03 13:43:58 +03:00
vms
f3a435616a use hardcoded free instead of xDel 2021-09-03 12:07:15 +03:00
3 changed files with 21 additions and 1 deletions

View File

@ -231,6 +231,7 @@
(@interface func (type 19) (@interface func (type 19)
arg.get 0 arg.get 0
string.size string.size
i32.push 1
call-core 0 call-core 0
arg.get 0 arg.get 0
string.lower_memory string.lower_memory
@ -238,6 +239,7 @@
i32.from_s32 i32.from_s32
arg.get 2 arg.get 2
string.size string.size
i32.push 1
call-core 0 call-core 0
arg.get 2 arg.get 2
string.lower_memory string.lower_memory
@ -307,6 +309,7 @@
i32.from_u32 i32.from_u32
arg.get 1 arg.get 1
string.size string.size
i32.push 1
call-core 0 call-core 0
arg.get 1 arg.get 1
string.lower_memory string.lower_memory
@ -349,6 +352,7 @@
i32.from_s32 i32.from_s32
arg.get 2 arg.get 2
string.size string.size
i32.push 1
call-core 0 call-core 0
arg.get 2 arg.get 2
string.lower_memory string.lower_memory
@ -366,6 +370,7 @@
i32.from_u32 i32.from_u32
arg.get 1 arg.get 1
string.size string.size
i32.push 1
call-core 0 call-core 0
arg.get 1 arg.get 1
string.lower_memory string.lower_memory

View File

@ -1447,7 +1447,13 @@ int sqlite3_bind_blob(
#ifdef SQLITE_ENABLE_API_ARMOR #ifdef SQLITE_ENABLE_API_ARMOR
if( nData<0 ) return SQLITE_MISUSE_BKPT; if( nData<0 ) return SQLITE_MISUSE_BKPT;
#endif #endif
#ifdef __sqlite_unmodified_upstream
return bindText(pStmt, i, zData, nData, xDel, 0); return bindText(pStmt, i, zData, nData, xDel, 0);
#else
// xDel is a custom deallocator, due to our IT architecture it can't be provided from other modules.
return bindText(pStmt, i, zData, nData, free, 0);
#endif
} }
int sqlite3_bind_blob64( int sqlite3_bind_blob64(
sqlite3_stmt *pStmt, sqlite3_stmt *pStmt,
@ -1521,7 +1527,12 @@ int sqlite3_bind_text(
int nData, int nData,
void (*xDel)(void*) void (*xDel)(void*)
){ ){
#ifdef __sqlite_unmodified_upstream
return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF8); return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF8);
#else
// xDel is a custom deallocator, due to our IT architecture it can't be provided from other modules.
return bindText(pStmt, i, zData, nData, free, SQLITE_UTF8);
#endif
} }
int sqlite3_bind_text64( int sqlite3_bind_text64(
sqlite3_stmt *pStmt, sqlite3_stmt *pStmt,

View File

@ -8,7 +8,11 @@ int RESULT_SIZE;
cvector_vector_type(void *) OBJECTS_TO_RELEASE; cvector_vector_type(void *) OBJECTS_TO_RELEASE;
void* allocate(size_t size) { void* allocate(size_t size, size_t _type_tag) {
if (size == 0 || size + 1 == 0) {
return 0;
}
// this +1 is needed to append then zero byte to strings passing to this module. // this +1 is needed to append then zero byte to strings passing to this module.
return malloc(size + 1); return malloc(size + 1);
} }