Skip to content

Commit 7229345

Browse files
committed
Shim sqlite3_carray_bind
It is now exported in the extapi and so must exist. This calls the patched version with an extra NULL parameter.
1 parent 9f315c8 commit 7229345

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

tools/carray.patch

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
# https://sqlite.org/forum/forumpost/c066073abd559b8e
2020

2121
diff --git a/sqlite3.c b/sqlite3-changed.c
22-
index f3a60e93..72050186 100644
22+
index 0a48c7e2..addfebb4 100644
2323
--- a/sqlite3.c
2424
+++ b/sqlite3-changed.c
25-
@@ -230074,10 +230074,11 @@ typedef struct carray_bind carray_bind;
25+
@@ -231456,10 +231456,11 @@ typedef struct carray_bind carray_bind;
2626
struct carray_bind {
2727
void *aData; /* The data */
2828
int nData; /* Number of elements */
@@ -34,7 +34,7 @@ index f3a60e93..72050186 100644
3434

3535
/* carray_cursor is a subclass of sqlite3_vtab_cursor which will
3636
** serve as the underlying representation of a cursor that scans
37-
@@ -230406,26 +230407,28 @@ static sqlite3_module carrayModule = {
37+
@@ -231788,26 +231789,28 @@ static sqlite3_module carrayModule = {
3838
** Destructor for the carray_bind object
3939
*/
4040
static void carrayBindDel(void *pPtr){
@@ -65,7 +65,7 @@ index f3a60e93..72050186 100644
6565
int i;
6666
int rc = SQLITE_OK;
6767

68-
@@ -230498,19 +230501,21 @@ SQLITE_API int sqlite3_carray_bind(
68+
@@ -231880,23 +231883,35 @@ SQLITE_API int sqlite3_carray_bind(
6969
}
7070
}else{
7171
memcpy(pNew->aData, aData, sz);
@@ -87,4 +87,18 @@ index f3a60e93..72050186 100644
8787
sqlite3_free(pNew);
8888
return rc;
8989
}
90+
+SQLITE_API int sqlite3_carray_bind(
91+
+ sqlite3_stmt *pStmt,
92+
+ int idx,
93+
+ void *aData,
94+
+ int nData,
95+
+ int mFlags,
96+
+ void (*xDestroy)(void*)
97+
+){
98+
+ return sqlite3_carray_bind_apsw(pStmt, idx, aData, nData, mFlags, xDestroy, NULL);
99+
+}
90100

101+
/*
102+
** Invoke this routine to register the carray() function.
103+
*/
104+
SQLITE_PRIVATE Module *sqlite3CarrayRegister(sqlite3 *db){

0 commit comments

Comments
 (0)