mirror of
https://github.com/asg017/sqlite-vec.git
synced 2026-04-25 00:36:56 +02:00
Fix compilation error for redefinition of jsonIsspace (#75)
* Fix compilation error for redefinition of jsonIsspace when including in amalgamation build of sqlite3.c * Fix redefinition variable jsonIsSpaceX[] * Add check for SQLITE_AMALGMATION * Add check for SQLITE_CORE
This commit is contained in:
parent
6cccfae273
commit
6c26399269
1 changed files with 3 additions and 0 deletions
|
|
@ -546,6 +546,7 @@ static f32 distance_hamming(const void *a, const void *b, const void *d) {
|
|||
return distance_hamming_u8((u8 *)a, (u8 *)b, dimensions / CHAR_BIT);
|
||||
}
|
||||
|
||||
#if !defined(SQLITE_CORE) || (defined(SQLITE_AMALGAMATION) && defined(SQLITE_OMIT_JSON))
|
||||
// from SQLite source:
|
||||
// https://github.com/sqlite/sqlite/blob/a509a90958ddb234d1785ed7801880ccb18b497e/src/json.c#L153
|
||||
static const char jsonIsSpaceX[] = {
|
||||
|
|
@ -563,7 +564,9 @@ static const char jsonIsSpaceX[] = {
|
|||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
};
|
||||
|
||||
#define jsonIsspace(x) (jsonIsSpaceX[(unsigned char)x])
|
||||
#endif
|
||||
|
||||
typedef void (*vector_cleanup)(void *p);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue