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.

wyoung 2021-06-22 16:29 fossil-spawn
Commit 202ea753e48cd2f3a2167e573542f6a63cda794c7200a6862e86f78768237a3f
1 file changed +1 -3
+1 -3
--- src/carray.c
+++ src/carray.c
@@ -51,12 +51,11 @@
5151
** the integer value of "pointer" as a pointer to the array and "count"
5252
** as the number of elements in the array. The virtual table steps through
5353
** the array, element by element.
5454
*/
5555
#define SQLITE_CORE
56
-#include "sqlite3ext.h"
57
-SQLITE_EXTENSION_INIT1
56
+#include "sqlite3.h"
5857
#include <assert.h>
5958
#include <string.h>
6059
#include "carray.h"
6160
6261
/* Allowed values for the mFlags parameter to sqlite3_carray_bind().
@@ -509,11 +508,10 @@
509508
sqlite3 *db,
510509
char **pzErrMsg,
511510
const sqlite3_api_routines *pApi
512511
){
513512
int rc = SQLITE_OK;
514
- SQLITE_EXTENSION_INIT2(pApi);
515513
#ifndef SQLITE_OMIT_VIRTUALTABLE
516514
rc = sqlite3_create_module(db, "carray", &carrayModule, 0);
517515
#ifdef SQLITE_TEST
518516
if( rc==SQLITE_OK ){
519517
rc = sqlite3_create_function(db, "inttoptr", 1, SQLITE_UTF8, 0,
520518
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button