Skip to content

Commit 591e717

Browse files
committed
Remove SQLITE_CORE build flag and Add SQLITE_EXTENSION_INIT
1 parent 427d4f2 commit 591e717

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ MAKEFLAGS += -j$(CPUS)
2626

2727
# Compiler and flags
2828
CC = gcc
29-
CFLAGS = -Wall -Wextra -Wno-unused-parameter -I$(SRC_DIR) -I$(LIB_DIR) -DSQLITE_CORE
29+
CFLAGS = -Wall -Wextra -Wno-unused-parameter -I$(SRC_DIR) -I$(LIB_DIR)
3030

3131
# Directories
3232
SRC_DIR = src

src/sqlite-vector.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
#include <float.h>
2525
#endif
2626

27+
#ifndef SQLITE_CORE
28+
SQLITE_EXTENSION_INIT1
29+
#endif
30+
2731
#define DEBUG_VECTOR_ALWAYS(...) do {printf(__VA_ARGS__ );printf("\n");} while (0)
2832

2933
#if ENABLE_VECTOR_DEBUG
@@ -1758,6 +1762,9 @@ static void vector_backend (sqlite3_context *context, int argc, sqlite3_value **
17581762
// MARK: -
17591763

17601764
SQLITE_VECTOR_API int sqlite3_vector_init (sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi) {
1765+
#ifndef SQLITE_CORE
1766+
SQLITE_EXTENSION_INIT2(pApi);
1767+
#endif
17611768
int rc = SQLITE_OK;
17621769

17631770
init_distance_functions(false);

0 commit comments

Comments
 (0)