Fossil SCM
Removed a few bits of src/carray.c that are only needed to allow building the module as a loadable extension. This goes beyond code minimalism, because one of the lines referenced a header we don't provide within Fossil, sqlite3ext.h, which means the only reason this branch compiled before is that it was picking up thje system version, risking a version mismatch when building against the internal SQLite. Build bug caught by initial work on the MinGW port, which doesn't provide that header.
Commit
202ea753e48cd2f3a2167e573542f6a63cda794c7200a6862e86f78768237a3f
Parent
3bcf3abd56df7e0…
1 file changed
+1
-3
+1
-3
| --- src/carray.c | ||
| +++ src/carray.c | ||
| @@ -51,12 +51,11 @@ | ||
| 51 | 51 | ** the integer value of "pointer" as a pointer to the array and "count" |
| 52 | 52 | ** as the number of elements in the array. The virtual table steps through |
| 53 | 53 | ** the array, element by element. |
| 54 | 54 | */ |
| 55 | 55 | #define SQLITE_CORE |
| 56 | -#include "sqlite3ext.h" | |
| 57 | -SQLITE_EXTENSION_INIT1 | |
| 56 | +#include "sqlite3.h" | |
| 58 | 57 | #include <assert.h> |
| 59 | 58 | #include <string.h> |
| 60 | 59 | #include "carray.h" |
| 61 | 60 | |
| 62 | 61 | /* Allowed values for the mFlags parameter to sqlite3_carray_bind(). |
| @@ -509,11 +508,10 @@ | ||
| 509 | 508 | sqlite3 *db, |
| 510 | 509 | char **pzErrMsg, |
| 511 | 510 | const sqlite3_api_routines *pApi |
| 512 | 511 | ){ |
| 513 | 512 | int rc = SQLITE_OK; |
| 514 | - SQLITE_EXTENSION_INIT2(pApi); | |
| 515 | 513 | #ifndef SQLITE_OMIT_VIRTUALTABLE |
| 516 | 514 | rc = sqlite3_create_module(db, "carray", &carrayModule, 0); |
| 517 | 515 | #ifdef SQLITE_TEST |
| 518 | 516 | if( rc==SQLITE_OK ){ |
| 519 | 517 | rc = sqlite3_create_function(db, "inttoptr", 1, SQLITE_UTF8, 0, |
| 520 | 518 |
| --- src/carray.c | |
| +++ src/carray.c | |
| @@ -51,12 +51,11 @@ | |
| 51 | ** the integer value of "pointer" as a pointer to the array and "count" |
| 52 | ** as the number of elements in the array. The virtual table steps through |
| 53 | ** the array, element by element. |
| 54 | */ |
| 55 | #define SQLITE_CORE |
| 56 | #include "sqlite3ext.h" |
| 57 | SQLITE_EXTENSION_INIT1 |
| 58 | #include <assert.h> |
| 59 | #include <string.h> |
| 60 | #include "carray.h" |
| 61 | |
| 62 | /* Allowed values for the mFlags parameter to sqlite3_carray_bind(). |
| @@ -509,11 +508,10 @@ | |
| 509 | sqlite3 *db, |
| 510 | char **pzErrMsg, |
| 511 | const sqlite3_api_routines *pApi |
| 512 | ){ |
| 513 | int rc = SQLITE_OK; |
| 514 | SQLITE_EXTENSION_INIT2(pApi); |
| 515 | #ifndef SQLITE_OMIT_VIRTUALTABLE |
| 516 | rc = sqlite3_create_module(db, "carray", &carrayModule, 0); |
| 517 | #ifdef SQLITE_TEST |
| 518 | if( rc==SQLITE_OK ){ |
| 519 | rc = sqlite3_create_function(db, "inttoptr", 1, SQLITE_UTF8, 0, |
| 520 |
| --- src/carray.c | |
| +++ src/carray.c | |
| @@ -51,12 +51,11 @@ | |
| 51 | ** the integer value of "pointer" as a pointer to the array and "count" |
| 52 | ** as the number of elements in the array. The virtual table steps through |
| 53 | ** the array, element by element. |
| 54 | */ |
| 55 | #define SQLITE_CORE |
| 56 | #include "sqlite3.h" |
| 57 | #include <assert.h> |
| 58 | #include <string.h> |
| 59 | #include "carray.h" |
| 60 | |
| 61 | /* Allowed values for the mFlags parameter to sqlite3_carray_bind(). |
| @@ -509,11 +508,10 @@ | |
| 508 | sqlite3 *db, |
| 509 | char **pzErrMsg, |
| 510 | const sqlite3_api_routines *pApi |
| 511 | ){ |
| 512 | int rc = SQLITE_OK; |
| 513 | #ifndef SQLITE_OMIT_VIRTUALTABLE |
| 514 | rc = sqlite3_create_module(db, "carray", &carrayModule, 0); |
| 515 | #ifdef SQLITE_TEST |
| 516 | if( rc==SQLITE_OK ){ |
| 517 | rc = sqlite3_create_function(db, "inttoptr", 1, SQLITE_UTF8, 0, |
| 518 |