Merge pull request #4 from fluencelabs/fix_xdel

Use hardcoded free instead of xDel
This commit is contained in:
Mike Voronov 2021-09-03 17:13:59 +03:00 committed by GitHub
commit e7c772cfb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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,