OLD | NEW |
1 /* | 1 /* |
2 ** 2006 June 7 | 2 ** 2006 June 7 |
3 ** | 3 ** |
4 ** The author disclaims copyright to this source code. In place of | 4 ** The author disclaims copyright to this source code. In place of |
5 ** a legal notice, here is a blessing: | 5 ** a legal notice, here is a blessing: |
6 ** | 6 ** |
7 ** May you do good and not evil. | 7 ** May you do good and not evil. |
8 ** May you find forgiveness for yourself and forgive others. | 8 ** May you find forgiveness for yourself and forgive others. |
9 ** May you share freely, never taking more than you give. | 9 ** May you share freely, never taking more than you give. |
10 ** | 10 ** |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 int (*load_extension)(sqlite3*,const char*,const char*,char**); | 260 int (*load_extension)(sqlite3*,const char*,const char*,char**); |
261 void *(*malloc64)(sqlite3_uint64); | 261 void *(*malloc64)(sqlite3_uint64); |
262 sqlite3_uint64 (*msize)(void*); | 262 sqlite3_uint64 (*msize)(void*); |
263 void *(*realloc64)(void*,sqlite3_uint64); | 263 void *(*realloc64)(void*,sqlite3_uint64); |
264 void (*reset_auto_extension)(void); | 264 void (*reset_auto_extension)(void); |
265 void (*result_blob64)(sqlite3_context*,const void*,sqlite3_uint64, | 265 void (*result_blob64)(sqlite3_context*,const void*,sqlite3_uint64, |
266 void(*)(void*)); | 266 void(*)(void*)); |
267 void (*result_text64)(sqlite3_context*,const char*,sqlite3_uint64, | 267 void (*result_text64)(sqlite3_context*,const char*,sqlite3_uint64, |
268 void(*)(void*), unsigned char); | 268 void(*)(void*), unsigned char); |
269 int (*strglob)(const char*,const char*); | 269 int (*strglob)(const char*,const char*); |
| 270 /* Version 3.8.11 and later */ |
| 271 sqlite3_value *(*value_dup)(const sqlite3_value*); |
| 272 void (*value_free)(sqlite3_value*); |
| 273 int (*result_zeroblob64)(sqlite3_context*,sqlite3_uint64); |
| 274 int (*bind_zeroblob64)(sqlite3_stmt*, int, sqlite3_uint64); |
| 275 /* Version 3.9.0 and later */ |
| 276 unsigned int (*value_subtype)(sqlite3_value*); |
| 277 void (*result_subtype)(sqlite3_context*,unsigned int); |
| 278 /* Version 3.10.0 and later */ |
| 279 int (*status64)(int,sqlite3_int64*,sqlite3_int64*,int); |
| 280 int (*strlike)(const char*,const char*,unsigned int); |
| 281 int (*db_cacheflush)(sqlite3*); |
270 }; | 282 }; |
271 | 283 |
272 /* | 284 /* |
273 ** The following macros redefine the API routines so that they are | 285 ** The following macros redefine the API routines so that they are |
274 ** redirected through the global sqlite3_api structure. | 286 ** redirected through the global sqlite3_api structure. |
275 ** | 287 ** |
276 ** This header file is also used by the loadext.c source file | 288 ** This header file is also used by the loadext.c source file |
277 ** (part of the main SQLite library - not an extension) so that | 289 ** (part of the main SQLite library - not an extension) so that |
278 ** it can get access to the sqlite3_api_routines structure | 290 ** it can get access to the sqlite3_api_routines structure |
279 ** definition. But the main library does not want to redefine | 291 ** definition. But the main library does not want to redefine |
280 ** the API. So the redefinition macros are only valid if the | 292 ** the API. So the redefinition macros are only valid if the |
281 ** SQLITE_CORE macros is undefined. | 293 ** SQLITE_CORE macros is undefined. |
282 */ | 294 */ |
283 #ifndef SQLITE_CORE | 295 #if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) |
284 #define sqlite3_aggregate_context sqlite3_api->aggregate_context | 296 #define sqlite3_aggregate_context sqlite3_api->aggregate_context |
285 #ifndef SQLITE_OMIT_DEPRECATED | 297 #ifndef SQLITE_OMIT_DEPRECATED |
286 #define sqlite3_aggregate_count sqlite3_api->aggregate_count | 298 #define sqlite3_aggregate_count sqlite3_api->aggregate_count |
287 #endif | 299 #endif |
288 #define sqlite3_bind_blob sqlite3_api->bind_blob | 300 #define sqlite3_bind_blob sqlite3_api->bind_blob |
289 #define sqlite3_bind_double sqlite3_api->bind_double | 301 #define sqlite3_bind_double sqlite3_api->bind_double |
290 #define sqlite3_bind_int sqlite3_api->bind_int | 302 #define sqlite3_bind_int sqlite3_api->bind_int |
291 #define sqlite3_bind_int64 sqlite3_api->bind_int64 | 303 #define sqlite3_bind_int64 sqlite3_api->bind_int64 |
292 #define sqlite3_bind_null sqlite3_api->bind_null | 304 #define sqlite3_bind_null sqlite3_api->bind_null |
293 #define sqlite3_bind_parameter_count sqlite3_api->bind_parameter_count | 305 #define sqlite3_bind_parameter_count sqlite3_api->bind_parameter_count |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 #define sqlite3_value_double sqlite3_api->value_double | 412 #define sqlite3_value_double sqlite3_api->value_double |
401 #define sqlite3_value_int sqlite3_api->value_int | 413 #define sqlite3_value_int sqlite3_api->value_int |
402 #define sqlite3_value_int64 sqlite3_api->value_int64 | 414 #define sqlite3_value_int64 sqlite3_api->value_int64 |
403 #define sqlite3_value_numeric_type sqlite3_api->value_numeric_type | 415 #define sqlite3_value_numeric_type sqlite3_api->value_numeric_type |
404 #define sqlite3_value_text sqlite3_api->value_text | 416 #define sqlite3_value_text sqlite3_api->value_text |
405 #define sqlite3_value_text16 sqlite3_api->value_text16 | 417 #define sqlite3_value_text16 sqlite3_api->value_text16 |
406 #define sqlite3_value_text16be sqlite3_api->value_text16be | 418 #define sqlite3_value_text16be sqlite3_api->value_text16be |
407 #define sqlite3_value_text16le sqlite3_api->value_text16le | 419 #define sqlite3_value_text16le sqlite3_api->value_text16le |
408 #define sqlite3_value_type sqlite3_api->value_type | 420 #define sqlite3_value_type sqlite3_api->value_type |
409 #define sqlite3_vmprintf sqlite3_api->vmprintf | 421 #define sqlite3_vmprintf sqlite3_api->vmprintf |
| 422 #define sqlite3_vsnprintf sqlite3_api->vsnprintf |
410 #define sqlite3_overload_function sqlite3_api->overload_function | 423 #define sqlite3_overload_function sqlite3_api->overload_function |
411 #define sqlite3_prepare_v2 sqlite3_api->prepare_v2 | 424 #define sqlite3_prepare_v2 sqlite3_api->prepare_v2 |
412 #define sqlite3_prepare16_v2 sqlite3_api->prepare16_v2 | 425 #define sqlite3_prepare16_v2 sqlite3_api->prepare16_v2 |
413 #define sqlite3_clear_bindings sqlite3_api->clear_bindings | 426 #define sqlite3_clear_bindings sqlite3_api->clear_bindings |
414 #define sqlite3_bind_zeroblob sqlite3_api->bind_zeroblob | 427 #define sqlite3_bind_zeroblob sqlite3_api->bind_zeroblob |
415 #define sqlite3_blob_bytes sqlite3_api->blob_bytes | 428 #define sqlite3_blob_bytes sqlite3_api->blob_bytes |
416 #define sqlite3_blob_close sqlite3_api->blob_close | 429 #define sqlite3_blob_close sqlite3_api->blob_close |
417 #define sqlite3_blob_open sqlite3_api->blob_open | 430 #define sqlite3_blob_open sqlite3_api->blob_open |
418 #define sqlite3_blob_read sqlite3_api->blob_read | 431 #define sqlite3_blob_read sqlite3_api->blob_read |
419 #define sqlite3_blob_write sqlite3_api->blob_write | 432 #define sqlite3_blob_write sqlite3_api->blob_write |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 #define sqlite3_bind_text64 sqlite3_api->bind_text64 | 503 #define sqlite3_bind_text64 sqlite3_api->bind_text64 |
491 #define sqlite3_cancel_auto_extension sqlite3_api->cancel_auto_extension | 504 #define sqlite3_cancel_auto_extension sqlite3_api->cancel_auto_extension |
492 #define sqlite3_load_extension sqlite3_api->load_extension | 505 #define sqlite3_load_extension sqlite3_api->load_extension |
493 #define sqlite3_malloc64 sqlite3_api->malloc64 | 506 #define sqlite3_malloc64 sqlite3_api->malloc64 |
494 #define sqlite3_msize sqlite3_api->msize | 507 #define sqlite3_msize sqlite3_api->msize |
495 #define sqlite3_realloc64 sqlite3_api->realloc64 | 508 #define sqlite3_realloc64 sqlite3_api->realloc64 |
496 #define sqlite3_reset_auto_extension sqlite3_api->reset_auto_extension | 509 #define sqlite3_reset_auto_extension sqlite3_api->reset_auto_extension |
497 #define sqlite3_result_blob64 sqlite3_api->result_blob64 | 510 #define sqlite3_result_blob64 sqlite3_api->result_blob64 |
498 #define sqlite3_result_text64 sqlite3_api->result_text64 | 511 #define sqlite3_result_text64 sqlite3_api->result_text64 |
499 #define sqlite3_strglob sqlite3_api->strglob | 512 #define sqlite3_strglob sqlite3_api->strglob |
500 #endif /* SQLITE_CORE */ | 513 /* Version 3.8.11 and later */ |
| 514 #define sqlite3_value_dup sqlite3_api->value_dup |
| 515 #define sqlite3_value_free sqlite3_api->value_free |
| 516 #define sqlite3_result_zeroblob64 sqlite3_api->result_zeroblob64 |
| 517 #define sqlite3_bind_zeroblob64 sqlite3_api->bind_zeroblob64 |
| 518 /* Version 3.9.0 and later */ |
| 519 #define sqlite3_value_subtype sqlite3_api->value_subtype |
| 520 #define sqlite3_result_subtype sqlite3_api->result_subtype |
| 521 /* Version 3.10.0 and later */ |
| 522 #define sqlite3_status64 sqlite3_api->status64 |
| 523 #define sqlite3_strlike sqlite3_api->strlike |
| 524 #define sqlite3_db_cacheflush sqlite3_api->db_cacheflush |
| 525 #endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */ |
501 | 526 |
502 #ifndef SQLITE_CORE | 527 #if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) |
503 /* This case when the file really is being compiled as a loadable | 528 /* This case when the file really is being compiled as a loadable |
504 ** extension */ | 529 ** extension */ |
505 # define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api=0; | 530 # define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api=0; |
506 # define SQLITE_EXTENSION_INIT2(v) sqlite3_api=v; | 531 # define SQLITE_EXTENSION_INIT2(v) sqlite3_api=v; |
507 # define SQLITE_EXTENSION_INIT3 \ | 532 # define SQLITE_EXTENSION_INIT3 \ |
508 extern const sqlite3_api_routines *sqlite3_api; | 533 extern const sqlite3_api_routines *sqlite3_api; |
509 #else | 534 #else |
510 /* This case when the file is being statically linked into the | 535 /* This case when the file is being statically linked into the |
511 ** application */ | 536 ** application */ |
512 # define SQLITE_EXTENSION_INIT1 /*no-op*/ | 537 # define SQLITE_EXTENSION_INIT1 /*no-op*/ |
513 # define SQLITE_EXTENSION_INIT2(v) (void)v; /* unused parameter */ | 538 # define SQLITE_EXTENSION_INIT2(v) (void)v; /* unused parameter */ |
514 # define SQLITE_EXTENSION_INIT3 /*no-op*/ | 539 # define SQLITE_EXTENSION_INIT3 /*no-op*/ |
515 #endif | 540 #endif |
516 | 541 |
517 #endif /* _SQLITE3EXT_H_ */ | 542 #endif /* _SQLITE3EXT_H_ */ |
OLD | NEW |