| | @@ -65,10 +65,18 @@ |
| 65 | 65 | ** In all cases, the special comment must be enclosed in the usual |
| 66 | 66 | ** slash-asterisk...asterisk-slash comment marks, with no spaces between the |
| 67 | 67 | ** asterisks and the comment text. |
| 68 | 68 | */ |
| 69 | 69 | |
| 70 | +/* |
| 71 | +** Make sure the Tcl calling convention macro is defined. This macro is |
| 72 | +** only used by test code and Tcl integration code. |
| 73 | +*/ |
| 74 | +#ifndef SQLITE_TCLAPI |
| 75 | +# define SQLITE_TCLAPI |
| 76 | +#endif |
| 77 | + |
| 70 | 78 | /* |
| 71 | 79 | ** Make sure that rand_s() is available on Windows systems with MSVC 2005 |
| 72 | 80 | ** or higher. |
| 73 | 81 | */ |
| 74 | 82 | #if defined(_MSC_VER) && _MSC_VER>=1400 |
| | @@ -304,12 +312,21 @@ |
| 304 | 312 | # define SQLITE_API |
| 305 | 313 | #endif |
| 306 | 314 | #ifndef SQLITE_CDECL |
| 307 | 315 | # define SQLITE_CDECL |
| 308 | 316 | #endif |
| 317 | +#ifndef SQLITE_APICALL |
| 318 | +# define SQLITE_APICALL |
| 319 | +#endif |
| 309 | 320 | #ifndef SQLITE_STDCALL |
| 310 | | -# define SQLITE_STDCALL |
| 321 | +# define SQLITE_STDCALL SQLITE_APICALL |
| 322 | +#endif |
| 323 | +#ifndef SQLITE_CALLBACK |
| 324 | +# define SQLITE_CALLBACK |
| 325 | +#endif |
| 326 | +#ifndef SQLITE_SYSAPI |
| 327 | +# define SQLITE_SYSAPI |
| 311 | 328 | #endif |
| 312 | 329 | |
| 313 | 330 | /* |
| 314 | 331 | ** These no-op macros are used in front of interfaces to mark those |
| 315 | 332 | ** interfaces as either deprecated or experimental. New applications |
| | @@ -363,11 +380,11 @@ |
| 363 | 380 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 364 | 381 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 365 | 382 | */ |
| 366 | 383 | #define SQLITE_VERSION "3.14.0" |
| 367 | 384 | #define SQLITE_VERSION_NUMBER 3014000 |
| 368 | | -#define SQLITE_SOURCE_ID "2016-07-25 12:10:25 d6f6c87c9c0acf609a9d5bea818bb7a5437109a1" |
| 385 | +#define SQLITE_SOURCE_ID "2016-08-02 08:45:26 7c38a79cdd42aaa45715aea330d10ca859098837" |
| 369 | 386 | |
| 370 | 387 | /* |
| 371 | 388 | ** CAPI3REF: Run-Time Library Version Numbers |
| 372 | 389 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 373 | 390 | ** |
| | @@ -396,13 +413,13 @@ |
| 396 | 413 | ** [SQLITE_SOURCE_ID] C preprocessor macro. |
| 397 | 414 | ** |
| 398 | 415 | ** See also: [sqlite_version()] and [sqlite_source_id()]. |
| 399 | 416 | */ |
| 400 | 417 | SQLITE_API const char sqlite3_version[] = SQLITE_VERSION; |
| 401 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void); |
| 402 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void); |
| 403 | | -SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void); |
| 418 | +SQLITE_API const char *SQLITE_APICALL sqlite3_libversion(void); |
| 419 | +SQLITE_API const char *SQLITE_APICALL sqlite3_sourceid(void); |
| 420 | +SQLITE_API int SQLITE_APICALL sqlite3_libversion_number(void); |
| 404 | 421 | |
| 405 | 422 | /* |
| 406 | 423 | ** CAPI3REF: Run-Time Library Compilation Options Diagnostics |
| 407 | 424 | ** |
| 408 | 425 | ** ^The sqlite3_compileoption_used() function returns 0 or 1 |
| | @@ -423,12 +440,12 @@ |
| 423 | 440 | ** |
| 424 | 441 | ** See also: SQL functions [sqlite_compileoption_used()] and |
| 425 | 442 | ** [sqlite_compileoption_get()] and the [compile_options pragma]. |
| 426 | 443 | */ |
| 427 | 444 | #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS |
| 428 | | -SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName); |
| 429 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N); |
| 445 | +SQLITE_API int SQLITE_APICALL sqlite3_compileoption_used(const char *zOptName); |
| 446 | +SQLITE_API const char *SQLITE_APICALL sqlite3_compileoption_get(int N); |
| 430 | 447 | #endif |
| 431 | 448 | |
| 432 | 449 | /* |
| 433 | 450 | ** CAPI3REF: Test To See If The Library Is Threadsafe |
| 434 | 451 | ** |
| | @@ -463,11 +480,11 @@ |
| 463 | 480 | ** sqlite3_config(). In other words, the return value from sqlite3_threadsafe() |
| 464 | 481 | ** is unchanged by calls to sqlite3_config().)^ |
| 465 | 482 | ** |
| 466 | 483 | ** See the [threading mode] documentation for additional information. |
| 467 | 484 | */ |
| 468 | | -SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void); |
| 485 | +SQLITE_API int SQLITE_APICALL sqlite3_threadsafe(void); |
| 469 | 486 | |
| 470 | 487 | /* |
| 471 | 488 | ** CAPI3REF: Database Connection Handle |
| 472 | 489 | ** KEYWORDS: {database connection} {database connections} |
| 473 | 490 | ** |
| | @@ -560,19 +577,19 @@ |
| 560 | 577 | ** from [sqlite3_open()], [sqlite3_open16()], or |
| 561 | 578 | ** [sqlite3_open_v2()], and not previously closed. |
| 562 | 579 | ** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer |
| 563 | 580 | ** argument is a harmless no-op. |
| 564 | 581 | */ |
| 565 | | -SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3*); |
| 566 | | -SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3*); |
| 582 | +SQLITE_API int SQLITE_APICALL sqlite3_close(sqlite3*); |
| 583 | +SQLITE_API int SQLITE_APICALL sqlite3_close_v2(sqlite3*); |
| 567 | 584 | |
| 568 | 585 | /* |
| 569 | 586 | ** The type for a callback function. |
| 570 | 587 | ** This is legacy and deprecated. It is included for historical |
| 571 | 588 | ** compatibility and is not documented. |
| 572 | 589 | */ |
| 573 | | -typedef int (*sqlite3_callback)(void*,int,char**, char**); |
| 590 | +typedef int (SQLITE_CALLBACK *sqlite3_callback)(void*,int,char**, char**); |
| 574 | 591 | |
| 575 | 592 | /* |
| 576 | 593 | ** CAPI3REF: One-Step Query Execution Interface |
| 577 | 594 | ** METHOD: sqlite3 |
| 578 | 595 | ** |
| | @@ -632,14 +649,14 @@ |
| 632 | 649 | ** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running. |
| 633 | 650 | ** <li> The application must not modify the SQL statement text passed into |
| 634 | 651 | ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running. |
| 635 | 652 | ** </ul> |
| 636 | 653 | */ |
| 637 | | -SQLITE_API int SQLITE_STDCALL sqlite3_exec( |
| 654 | +SQLITE_API int SQLITE_APICALL sqlite3_exec( |
| 638 | 655 | sqlite3*, /* An open database */ |
| 639 | 656 | const char *sql, /* SQL to be evaluated */ |
| 640 | | - int (*callback)(void*,int,char**,char**), /* Callback function */ |
| 657 | + int (SQLITE_CALLBACK *callback)(void*,int,char**,char**), /* Callback function */ |
| 641 | 658 | void *, /* 1st argument to callback */ |
| 642 | 659 | char **errmsg /* Error msg written here */ |
| 643 | 660 | ); |
| 644 | 661 | |
| 645 | 662 | /* |
| | @@ -983,30 +1000,30 @@ |
| 983 | 1000 | ** database corruption. |
| 984 | 1001 | */ |
| 985 | 1002 | typedef struct sqlite3_io_methods sqlite3_io_methods; |
| 986 | 1003 | struct sqlite3_io_methods { |
| 987 | 1004 | int iVersion; |
| 988 | | - int (*xClose)(sqlite3_file*); |
| 989 | | - int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst); |
| 990 | | - int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst); |
| 991 | | - int (*xTruncate)(sqlite3_file*, sqlite3_int64 size); |
| 992 | | - int (*xSync)(sqlite3_file*, int flags); |
| 993 | | - int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize); |
| 994 | | - int (*xLock)(sqlite3_file*, int); |
| 995 | | - int (*xUnlock)(sqlite3_file*, int); |
| 996 | | - int (*xCheckReservedLock)(sqlite3_file*, int *pResOut); |
| 997 | | - int (*xFileControl)(sqlite3_file*, int op, void *pArg); |
| 998 | | - int (*xSectorSize)(sqlite3_file*); |
| 999 | | - int (*xDeviceCharacteristics)(sqlite3_file*); |
| 1005 | + int (SQLITE_CALLBACK *xClose)(sqlite3_file*); |
| 1006 | + int (SQLITE_CALLBACK *xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst); |
| 1007 | + int (SQLITE_CALLBACK *xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst); |
| 1008 | + int (SQLITE_CALLBACK *xTruncate)(sqlite3_file*, sqlite3_int64 size); |
| 1009 | + int (SQLITE_CALLBACK *xSync)(sqlite3_file*, int flags); |
| 1010 | + int (SQLITE_CALLBACK *xFileSize)(sqlite3_file*, sqlite3_int64 *pSize); |
| 1011 | + int (SQLITE_CALLBACK *xLock)(sqlite3_file*, int); |
| 1012 | + int (SQLITE_CALLBACK *xUnlock)(sqlite3_file*, int); |
| 1013 | + int (SQLITE_CALLBACK *xCheckReservedLock)(sqlite3_file*, int *pResOut); |
| 1014 | + int (SQLITE_CALLBACK *xFileControl)(sqlite3_file*, int op, void *pArg); |
| 1015 | + int (SQLITE_CALLBACK *xSectorSize)(sqlite3_file*); |
| 1016 | + int (SQLITE_CALLBACK *xDeviceCharacteristics)(sqlite3_file*); |
| 1000 | 1017 | /* Methods above are valid for version 1 */ |
| 1001 | | - int (*xShmMap)(sqlite3_file*, int iPg, int pgsz, int, void volatile**); |
| 1002 | | - int (*xShmLock)(sqlite3_file*, int offset, int n, int flags); |
| 1003 | | - void (*xShmBarrier)(sqlite3_file*); |
| 1004 | | - int (*xShmUnmap)(sqlite3_file*, int deleteFlag); |
| 1018 | + int (SQLITE_CALLBACK *xShmMap)(sqlite3_file*, int iPg, int pgsz, int, void volatile**); |
| 1019 | + int (SQLITE_CALLBACK *xShmLock)(sqlite3_file*, int offset, int n, int flags); |
| 1020 | + void (SQLITE_CALLBACK *xShmBarrier)(sqlite3_file*); |
| 1021 | + int (SQLITE_CALLBACK *xShmUnmap)(sqlite3_file*, int deleteFlag); |
| 1005 | 1022 | /* Methods above are valid for version 2 */ |
| 1006 | | - int (*xFetch)(sqlite3_file*, sqlite3_int64 iOfst, int iAmt, void **pp); |
| 1007 | | - int (*xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p); |
| 1023 | + int (SQLITE_CALLBACK *xFetch)(sqlite3_file*, sqlite3_int64 iOfst, int iAmt, void **pp); |
| 1024 | + int (SQLITE_CALLBACK *xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p); |
| 1008 | 1025 | /* Methods above are valid for version 3 */ |
| 1009 | 1026 | /* Additional methods may be added in future releases */ |
| 1010 | 1027 | }; |
| 1011 | 1028 | |
| 1012 | 1029 | /* |
| | @@ -1178,11 +1195,11 @@ |
| 1178 | 1195 | ** ^The [SQLITE_FCNTL_BUSYHANDLER] |
| 1179 | 1196 | ** file-control may be invoked by SQLite on the database file handle |
| 1180 | 1197 | ** shortly after it is opened in order to provide a custom VFS with access |
| 1181 | 1198 | ** to the connections busy-handler callback. The argument is of type (void **) |
| 1182 | 1199 | ** - an array of two (void *) values. The first (void *) actually points |
| 1183 | | -** to a function of type (int (*)(void *)). In order to invoke the connections |
| 1200 | +** to a function of type (int (SQLITE_CALLBACK *)(void *)). In order to invoke the connections |
| 1184 | 1201 | ** busy-handler, this function should be invoked with the second (void *) in |
| 1185 | 1202 | ** the array as the only argument. If it returns non-zero, then the operation |
| 1186 | 1203 | ** should be retried. If it returns zero, the custom VFS should abandon the |
| 1187 | 1204 | ** current operation. |
| 1188 | 1205 | ** |
| | @@ -1286,10 +1303,20 @@ |
| 1286 | 1303 | ** |
| 1287 | 1304 | ** Mutexes are created using [sqlite3_mutex_alloc()]. |
| 1288 | 1305 | */ |
| 1289 | 1306 | typedef struct sqlite3_mutex sqlite3_mutex; |
| 1290 | 1307 | |
| 1308 | +/* |
| 1309 | +** CAPI3REF: Loadable Extension Thunk |
| 1310 | +** |
| 1311 | +** A pointer to the opaque sqlite3_api_routines structure is passed as |
| 1312 | +** the third parameter to entry points of [loadable extensions]. This |
| 1313 | +** structure must be typedefed in order to work around compiler warnings |
| 1314 | +** on some platforms. |
| 1315 | +*/ |
| 1316 | +typedef struct sqlite3_api_routines sqlite3_api_routines; |
| 1317 | + |
| 1291 | 1318 | /* |
| 1292 | 1319 | ** CAPI3REF: OS Interface Object |
| 1293 | 1320 | ** |
| 1294 | 1321 | ** An instance of the sqlite3_vfs object defines the interface between |
| 1295 | 1322 | ** the SQLite core and the underlying operating system. The "vfs" |
| | @@ -1444,43 +1471,43 @@ |
| 1444 | 1471 | ** or all of these interfaces to be NULL or for their behavior to change |
| 1445 | 1472 | ** from one release to the next. Applications must not attempt to access |
| 1446 | 1473 | ** any of these methods if the iVersion of the VFS is less than 3. |
| 1447 | 1474 | */ |
| 1448 | 1475 | typedef struct sqlite3_vfs sqlite3_vfs; |
| 1449 | | -typedef void (*sqlite3_syscall_ptr)(void); |
| 1476 | +typedef void (SQLITE_SYSAPI *sqlite3_syscall_ptr)(void); |
| 1450 | 1477 | struct sqlite3_vfs { |
| 1451 | 1478 | int iVersion; /* Structure version number (currently 3) */ |
| 1452 | 1479 | int szOsFile; /* Size of subclassed sqlite3_file */ |
| 1453 | 1480 | int mxPathname; /* Maximum file pathname length */ |
| 1454 | 1481 | sqlite3_vfs *pNext; /* Next registered VFS */ |
| 1455 | 1482 | const char *zName; /* Name of this virtual file system */ |
| 1456 | 1483 | void *pAppData; /* Pointer to application-specific data */ |
| 1457 | | - int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*, |
| 1484 | + int (SQLITE_CALLBACK *xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*, |
| 1458 | 1485 | int flags, int *pOutFlags); |
| 1459 | | - int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir); |
| 1460 | | - int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut); |
| 1461 | | - int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut); |
| 1462 | | - void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename); |
| 1463 | | - void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg); |
| 1464 | | - void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void); |
| 1465 | | - void (*xDlClose)(sqlite3_vfs*, void*); |
| 1466 | | - int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut); |
| 1467 | | - int (*xSleep)(sqlite3_vfs*, int microseconds); |
| 1468 | | - int (*xCurrentTime)(sqlite3_vfs*, double*); |
| 1469 | | - int (*xGetLastError)(sqlite3_vfs*, int, char *); |
| 1486 | + int (SQLITE_CALLBACK *xDelete)(sqlite3_vfs*, const char *zName, int syncDir); |
| 1487 | + int (SQLITE_CALLBACK *xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut); |
| 1488 | + int (SQLITE_CALLBACK *xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut); |
| 1489 | + void *(SQLITE_CALLBACK *xDlOpen)(sqlite3_vfs*, const char *zFilename); |
| 1490 | + void (SQLITE_CALLBACK *xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg); |
| 1491 | + void (SQLITE_CALLBACK *(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void); |
| 1492 | + void (SQLITE_CALLBACK *xDlClose)(sqlite3_vfs*, void*); |
| 1493 | + int (SQLITE_CALLBACK *xRandomness)(sqlite3_vfs*, int nByte, char *zOut); |
| 1494 | + int (SQLITE_CALLBACK *xSleep)(sqlite3_vfs*, int microseconds); |
| 1495 | + int (SQLITE_CALLBACK *xCurrentTime)(sqlite3_vfs*, double*); |
| 1496 | + int (SQLITE_CALLBACK *xGetLastError)(sqlite3_vfs*, int, char *); |
| 1470 | 1497 | /* |
| 1471 | 1498 | ** The methods above are in version 1 of the sqlite_vfs object |
| 1472 | 1499 | ** definition. Those that follow are added in version 2 or later |
| 1473 | 1500 | */ |
| 1474 | | - int (*xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*); |
| 1501 | + int (SQLITE_CALLBACK *xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*); |
| 1475 | 1502 | /* |
| 1476 | 1503 | ** The methods above are in versions 1 and 2 of the sqlite_vfs object. |
| 1477 | 1504 | ** Those below are for version 3 and greater. |
| 1478 | 1505 | */ |
| 1479 | | - int (*xSetSystemCall)(sqlite3_vfs*, const char *zName, sqlite3_syscall_ptr); |
| 1480 | | - sqlite3_syscall_ptr (*xGetSystemCall)(sqlite3_vfs*, const char *zName); |
| 1481 | | - const char *(*xNextSystemCall)(sqlite3_vfs*, const char *zName); |
| 1506 | + int (SQLITE_CALLBACK *xSetSystemCall)(sqlite3_vfs*, const char *zName, sqlite3_syscall_ptr); |
| 1507 | + sqlite3_syscall_ptr (SQLITE_CALLBACK *xGetSystemCall)(sqlite3_vfs*, const char *zName); |
| 1508 | + const char *(SQLITE_CALLBACK *xNextSystemCall)(sqlite3_vfs*, const char *zName); |
| 1482 | 1509 | /* |
| 1483 | 1510 | ** The methods above are in versions 1 through 3 of the sqlite_vfs object. |
| 1484 | 1511 | ** New fields may be appended in future versions. The iVersion |
| 1485 | 1512 | ** value will increment whenever this happens. |
| 1486 | 1513 | */ |
| | @@ -1621,14 +1648,14 @@ |
| 1621 | 1648 | ** sqlite3_os_init() and sqlite3_os_end(). An application-supplied |
| 1622 | 1649 | ** implementation of sqlite3_os_init() or sqlite3_os_end() |
| 1623 | 1650 | ** must return [SQLITE_OK] on success and some other [error code] upon |
| 1624 | 1651 | ** failure. |
| 1625 | 1652 | */ |
| 1626 | | -SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void); |
| 1627 | | -SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void); |
| 1628 | | -SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void); |
| 1629 | | -SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void); |
| 1653 | +SQLITE_API int SQLITE_APICALL sqlite3_initialize(void); |
| 1654 | +SQLITE_API int SQLITE_APICALL sqlite3_shutdown(void); |
| 1655 | +SQLITE_API int SQLITE_APICALL sqlite3_os_init(void); |
| 1656 | +SQLITE_API int SQLITE_APICALL sqlite3_os_end(void); |
| 1630 | 1657 | |
| 1631 | 1658 | /* |
| 1632 | 1659 | ** CAPI3REF: Configuring The SQLite Library |
| 1633 | 1660 | ** |
| 1634 | 1661 | ** The sqlite3_config() interface is used to make global configuration |
| | @@ -1743,17 +1770,17 @@ |
| 1743 | 1770 | ** SQLite will never invoke xInit() more than once without an intervening |
| 1744 | 1771 | ** call to xShutdown(). |
| 1745 | 1772 | */ |
| 1746 | 1773 | typedef struct sqlite3_mem_methods sqlite3_mem_methods; |
| 1747 | 1774 | struct sqlite3_mem_methods { |
| 1748 | | - void *(*xMalloc)(int); /* Memory allocation function */ |
| 1749 | | - void (*xFree)(void*); /* Free a prior allocation */ |
| 1750 | | - void *(*xRealloc)(void*,int); /* Resize an allocation */ |
| 1751 | | - int (*xSize)(void*); /* Return the size of an allocation */ |
| 1752 | | - int (*xRoundup)(int); /* Round up request size to allocation size */ |
| 1753 | | - int (*xInit)(void*); /* Initialize the memory allocator */ |
| 1754 | | - void (*xShutdown)(void*); /* Deinitialize the memory allocator */ |
| 1775 | + void *(SQLITE_CALLBACK *xMalloc)(int); /* Memory allocation function */ |
| 1776 | + void (SQLITE_CALLBACK *xFree)(void*); /* Free a prior allocation */ |
| 1777 | + void *(SQLITE_CALLBACK *xRealloc)(void*,int); /* Resize an allocation */ |
| 1778 | + int (SQLITE_CALLBACK *xSize)(void*); /* Return the size of an allocation */ |
| 1779 | + int (SQLITE_CALLBACK *xRoundup)(int); /* Round up request size to allocation size */ |
| 1780 | + int (SQLITE_CALLBACK *xInit)(void*); /* Initialize the memory allocator */ |
| 1781 | + void (SQLITE_CALLBACK *xShutdown)(void*); /* Deinitialize the memory allocator */ |
| 1755 | 1782 | void *pAppData; /* Argument to xInit() and xShutdown() */ |
| 1756 | 1783 | }; |
| 1757 | 1784 | |
| 1758 | 1785 | /* |
| 1759 | 1786 | ** CAPI3REF: Configuration Options |
| | @@ -1966,11 +1993,11 @@ |
| 1966 | 1993 | ** |
| 1967 | 1994 | ** [[SQLITE_CONFIG_LOG]] <dt>SQLITE_CONFIG_LOG</dt> |
| 1968 | 1995 | ** <dd> The SQLITE_CONFIG_LOG option is used to configure the SQLite |
| 1969 | 1996 | ** global [error log]. |
| 1970 | 1997 | ** (^The SQLITE_CONFIG_LOG option takes two arguments: a pointer to a |
| 1971 | | -** function with a call signature of void(*)(void*,int,const char*), |
| 1998 | +** function with a call signature of void(SQLITE_CALLBACK *)(void*,int,const char*), |
| 1972 | 1999 | ** and a pointer to void. ^If the function pointer is not NULL, it is |
| 1973 | 2000 | ** invoked by [sqlite3_log()] to process each logging event. ^If the |
| 1974 | 2001 | ** function pointer is NULL, the [sqlite3_log()] interface becomes a no-op. |
| 1975 | 2002 | ** ^The void pointer that is the second argument to SQLITE_CONFIG_LOG is |
| 1976 | 2003 | ** passed through as the first parameter to the application-defined logger |
| | @@ -2019,11 +2046,11 @@ |
| 2019 | 2046 | ** |
| 2020 | 2047 | ** [[SQLITE_CONFIG_SQLLOG]] |
| 2021 | 2048 | ** <dt>SQLITE_CONFIG_SQLLOG |
| 2022 | 2049 | ** <dd>This option is only available if sqlite is compiled with the |
| 2023 | 2050 | ** [SQLITE_ENABLE_SQLLOG] pre-processor macro defined. The first argument should |
| 2024 | | -** be a pointer to a function of type void(*)(void*,sqlite3*,const char*, int). |
| 2051 | +** be a pointer to a function of type void(SQLITE_CALLBACK *)(void*,sqlite3*,const char*, int). |
| 2025 | 2052 | ** The second should be of type (void*). The callback is invoked by the library |
| 2026 | 2053 | ** in three separate circumstances, identified by the value passed as the |
| 2027 | 2054 | ** fourth parameter. If the fourth parameter is 0, then the database connection |
| 2028 | 2055 | ** passed as the second argument has just been opened. The third argument |
| 2029 | 2056 | ** points to a buffer containing the name of the main database file. If the |
| | @@ -2217,11 +2244,11 @@ |
| 2217 | 2244 | ** |
| 2218 | 2245 | ** ^The sqlite3_extended_result_codes() routine enables or disables the |
| 2219 | 2246 | ** [extended result codes] feature of SQLite. ^The extended result |
| 2220 | 2247 | ** codes are disabled by default for historical compatibility. |
| 2221 | 2248 | */ |
| 2222 | | -SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff); |
| 2249 | +SQLITE_API int SQLITE_APICALL sqlite3_extended_result_codes(sqlite3*, int onoff); |
| 2223 | 2250 | |
| 2224 | 2251 | /* |
| 2225 | 2252 | ** CAPI3REF: Last Insert Rowid |
| 2226 | 2253 | ** METHOD: sqlite3 |
| 2227 | 2254 | ** |
| | @@ -2269,11 +2296,11 @@ |
| 2269 | 2296 | ** function is running and thus changes the last insert [rowid], |
| 2270 | 2297 | ** then the value returned by [sqlite3_last_insert_rowid()] is |
| 2271 | 2298 | ** unpredictable and might not equal either the old or the new |
| 2272 | 2299 | ** last insert [rowid]. |
| 2273 | 2300 | */ |
| 2274 | | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*); |
| 2301 | +SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_last_insert_rowid(sqlite3*); |
| 2275 | 2302 | |
| 2276 | 2303 | /* |
| 2277 | 2304 | ** CAPI3REF: Count The Number Of Rows Modified |
| 2278 | 2305 | ** METHOD: sqlite3 |
| 2279 | 2306 | ** |
| | @@ -2322,11 +2349,11 @@ |
| 2322 | 2349 | ** |
| 2323 | 2350 | ** If a separate thread makes changes on the same database connection |
| 2324 | 2351 | ** while [sqlite3_changes()] is running then the value returned |
| 2325 | 2352 | ** is unpredictable and not meaningful. |
| 2326 | 2353 | */ |
| 2327 | | -SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3*); |
| 2354 | +SQLITE_API int SQLITE_APICALL sqlite3_changes(sqlite3*); |
| 2328 | 2355 | |
| 2329 | 2356 | /* |
| 2330 | 2357 | ** CAPI3REF: Total Number Of Rows Modified |
| 2331 | 2358 | ** METHOD: sqlite3 |
| 2332 | 2359 | ** |
| | @@ -2346,11 +2373,11 @@ |
| 2346 | 2373 | ** |
| 2347 | 2374 | ** If a separate thread makes changes on the same database connection |
| 2348 | 2375 | ** while [sqlite3_total_changes()] is running then the value |
| 2349 | 2376 | ** returned is unpredictable and not meaningful. |
| 2350 | 2377 | */ |
| 2351 | | -SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3*); |
| 2378 | +SQLITE_API int SQLITE_APICALL sqlite3_total_changes(sqlite3*); |
| 2352 | 2379 | |
| 2353 | 2380 | /* |
| 2354 | 2381 | ** CAPI3REF: Interrupt A Long-Running Query |
| 2355 | 2382 | ** METHOD: sqlite3 |
| 2356 | 2383 | ** |
| | @@ -2386,11 +2413,11 @@ |
| 2386 | 2413 | ** that are started after the sqlite3_interrupt() call returns. |
| 2387 | 2414 | ** |
| 2388 | 2415 | ** If the database connection closes while [sqlite3_interrupt()] |
| 2389 | 2416 | ** is running then bad things will likely happen. |
| 2390 | 2417 | */ |
| 2391 | | -SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3*); |
| 2418 | +SQLITE_API void SQLITE_APICALL sqlite3_interrupt(sqlite3*); |
| 2392 | 2419 | |
| 2393 | 2420 | /* |
| 2394 | 2421 | ** CAPI3REF: Determine If An SQL Statement Is Complete |
| 2395 | 2422 | ** |
| 2396 | 2423 | ** These routines are useful during command-line input to determine if the |
| | @@ -2421,12 +2448,12 @@ |
| 2421 | 2448 | ** UTF-8 string. |
| 2422 | 2449 | ** |
| 2423 | 2450 | ** The input to [sqlite3_complete16()] must be a zero-terminated |
| 2424 | 2451 | ** UTF-16 string in native byte order. |
| 2425 | 2452 | */ |
| 2426 | | -SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *sql); |
| 2427 | | -SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *sql); |
| 2453 | +SQLITE_API int SQLITE_APICALL sqlite3_complete(const char *sql); |
| 2454 | +SQLITE_API int SQLITE_APICALL sqlite3_complete16(const void *sql); |
| 2428 | 2455 | |
| 2429 | 2456 | /* |
| 2430 | 2457 | ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors |
| 2431 | 2458 | ** KEYWORDS: {busy-handler callback} {busy handler} |
| 2432 | 2459 | ** METHOD: sqlite3 |
| | @@ -2483,11 +2510,11 @@ |
| 2483 | 2510 | ** result in undefined behavior. |
| 2484 | 2511 | ** |
| 2485 | 2512 | ** A busy handler must not close the database connection |
| 2486 | 2513 | ** or [prepared statement] that invoked the busy handler. |
| 2487 | 2514 | */ |
| 2488 | | -SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*); |
| 2515 | +SQLITE_API int SQLITE_APICALL sqlite3_busy_handler(sqlite3*,int(SQLITE_CALLBACK *)(void*,int),void*); |
| 2489 | 2516 | |
| 2490 | 2517 | /* |
| 2491 | 2518 | ** CAPI3REF: Set A Busy Timeout |
| 2492 | 2519 | ** METHOD: sqlite3 |
| 2493 | 2520 | ** |
| | @@ -2506,11 +2533,11 @@ |
| 2506 | 2533 | ** was defined (using [sqlite3_busy_handler()]) prior to calling |
| 2507 | 2534 | ** this routine, that other busy handler is cleared.)^ |
| 2508 | 2535 | ** |
| 2509 | 2536 | ** See also: [PRAGMA busy_timeout] |
| 2510 | 2537 | */ |
| 2511 | | -SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3*, int ms); |
| 2538 | +SQLITE_API int SQLITE_APICALL sqlite3_busy_timeout(sqlite3*, int ms); |
| 2512 | 2539 | |
| 2513 | 2540 | /* |
| 2514 | 2541 | ** CAPI3REF: Convenience Routines For Running Queries |
| 2515 | 2542 | ** METHOD: sqlite3 |
| 2516 | 2543 | ** |
| | @@ -2581,19 +2608,19 @@ |
| 2581 | 2608 | ** interface defined here. As a consequence, errors that occur in the |
| 2582 | 2609 | ** wrapper layer outside of the internal [sqlite3_exec()] call are not |
| 2583 | 2610 | ** reflected in subsequent calls to [sqlite3_errcode()] or |
| 2584 | 2611 | ** [sqlite3_errmsg()]. |
| 2585 | 2612 | */ |
| 2586 | | -SQLITE_API int SQLITE_STDCALL sqlite3_get_table( |
| 2613 | +SQLITE_API int SQLITE_APICALL sqlite3_get_table( |
| 2587 | 2614 | sqlite3 *db, /* An open database */ |
| 2588 | 2615 | const char *zSql, /* SQL to be evaluated */ |
| 2589 | 2616 | char ***pazResult, /* Results of the query */ |
| 2590 | 2617 | int *pnRow, /* Number of result rows written here */ |
| 2591 | 2618 | int *pnColumn, /* Number of result columns written here */ |
| 2592 | 2619 | char **pzErrmsg /* Error msg written here */ |
| 2593 | 2620 | ); |
| 2594 | | -SQLITE_API void SQLITE_STDCALL sqlite3_free_table(char **result); |
| 2621 | +SQLITE_API void SQLITE_APICALL sqlite3_free_table(char **result); |
| 2595 | 2622 | |
| 2596 | 2623 | /* |
| 2597 | 2624 | ** CAPI3REF: Formatted String Printing Functions |
| 2598 | 2625 | ** |
| 2599 | 2626 | ** These routines are work-alikes of the "printf()" family of functions |
| | @@ -2696,13 +2723,13 @@ |
| 2696 | 2723 | ** ^(The "%z" formatting option works like "%s" but with the |
| 2697 | 2724 | ** addition that after the string has been read and copied into |
| 2698 | 2725 | ** the result, [sqlite3_free()] is called on the input string.)^ |
| 2699 | 2726 | */ |
| 2700 | 2727 | SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char*,...); |
| 2701 | | -SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char*, va_list); |
| 2728 | +SQLITE_API char *SQLITE_APICALL sqlite3_vmprintf(const char*, va_list); |
| 2702 | 2729 | SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int,char*,const char*, ...); |
| 2703 | | -SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int,char*,const char*, va_list); |
| 2730 | +SQLITE_API char *SQLITE_APICALL sqlite3_vsnprintf(int,char*,const char*, va_list); |
| 2704 | 2731 | |
| 2705 | 2732 | /* |
| 2706 | 2733 | ** CAPI3REF: Memory Allocation Subsystem |
| 2707 | 2734 | ** |
| 2708 | 2735 | ** The SQLite core uses these three routines for all of its own |
| | @@ -2788,16 +2815,16 @@ |
| 2788 | 2815 | ** |
| 2789 | 2816 | ** The application must not read or write any part of |
| 2790 | 2817 | ** a block of memory after it has been released using |
| 2791 | 2818 | ** [sqlite3_free()] or [sqlite3_realloc()]. |
| 2792 | 2819 | */ |
| 2793 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int); |
| 2794 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64); |
| 2795 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void*, int); |
| 2796 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void*, sqlite3_uint64); |
| 2797 | | -SQLITE_API void SQLITE_STDCALL sqlite3_free(void*); |
| 2798 | | -SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void*); |
| 2820 | +SQLITE_API void *SQLITE_APICALL sqlite3_malloc(int); |
| 2821 | +SQLITE_API void *SQLITE_APICALL sqlite3_malloc64(sqlite3_uint64); |
| 2822 | +SQLITE_API void *SQLITE_APICALL sqlite3_realloc(void*, int); |
| 2823 | +SQLITE_API void *SQLITE_APICALL sqlite3_realloc64(void*, sqlite3_uint64); |
| 2824 | +SQLITE_API void SQLITE_APICALL sqlite3_free(void*); |
| 2825 | +SQLITE_API sqlite3_uint64 SQLITE_APICALL sqlite3_msize(void*); |
| 2799 | 2826 | |
| 2800 | 2827 | /* |
| 2801 | 2828 | ** CAPI3REF: Memory Allocator Statistics |
| 2802 | 2829 | ** |
| 2803 | 2830 | ** SQLite provides these two interfaces for reporting on the status |
| | @@ -2818,12 +2845,12 @@ |
| 2818 | 2845 | ** [sqlite3_memory_used()] if and only if the parameter to |
| 2819 | 2846 | ** [sqlite3_memory_highwater()] is true. ^The value returned |
| 2820 | 2847 | ** by [sqlite3_memory_highwater(1)] is the high-water mark |
| 2821 | 2848 | ** prior to the reset. |
| 2822 | 2849 | */ |
| 2823 | | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void); |
| 2824 | | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag); |
| 2850 | +SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_memory_used(void); |
| 2851 | +SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_memory_highwater(int resetFlag); |
| 2825 | 2852 | |
| 2826 | 2853 | /* |
| 2827 | 2854 | ** CAPI3REF: Pseudo-Random Number Generator |
| 2828 | 2855 | ** |
| 2829 | 2856 | ** SQLite contains a high-quality pseudo-random number generator (PRNG) used to |
| | @@ -2842,11 +2869,11 @@ |
| 2842 | 2869 | ** ^If the previous call to this routine had an N of 1 or more and a |
| 2843 | 2870 | ** non-NULL P then the pseudo-randomness is generated |
| 2844 | 2871 | ** internally and without recourse to the [sqlite3_vfs] xRandomness |
| 2845 | 2872 | ** method. |
| 2846 | 2873 | */ |
| 2847 | | -SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P); |
| 2874 | +SQLITE_API void SQLITE_APICALL sqlite3_randomness(int N, void *P); |
| 2848 | 2875 | |
| 2849 | 2876 | /* |
| 2850 | 2877 | ** CAPI3REF: Compile-Time Authorization Callbacks |
| 2851 | 2878 | ** METHOD: sqlite3 |
| 2852 | 2879 | ** |
| | @@ -2925,13 +2952,13 @@ |
| 2925 | 2952 | ** [sqlite3_prepare()] or its variants. Authorization is not |
| 2926 | 2953 | ** performed during statement evaluation in [sqlite3_step()], unless |
| 2927 | 2954 | ** as stated in the previous paragraph, sqlite3_step() invokes |
| 2928 | 2955 | ** sqlite3_prepare_v2() to reprepare a statement after a schema change. |
| 2929 | 2956 | */ |
| 2930 | | -SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer( |
| 2957 | +SQLITE_API int SQLITE_APICALL sqlite3_set_authorizer( |
| 2931 | 2958 | sqlite3*, |
| 2932 | | - int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), |
| 2959 | + int (SQLITE_CALLBACK *xAuth)(void*,int,const char*,const char*,const char*,const char*), |
| 2933 | 2960 | void *pUserData |
| 2934 | 2961 | ); |
| 2935 | 2962 | |
| 2936 | 2963 | /* |
| 2937 | 2964 | ** CAPI3REF: Authorizer Return Codes |
| | @@ -3033,14 +3060,14 @@ |
| 3033 | 3060 | ** digits in the time are meaningless. Future versions of SQLite |
| 3034 | 3061 | ** might provide greater resolution on the profiler callback. The |
| 3035 | 3062 | ** sqlite3_profile() function is considered experimental and is |
| 3036 | 3063 | ** subject to change in future versions of SQLite. |
| 3037 | 3064 | */ |
| 3038 | | -SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_trace(sqlite3*, |
| 3039 | | - void(*xTrace)(void*,const char*), void*); |
| 3040 | | -SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_profile(sqlite3*, |
| 3041 | | - void(*xProfile)(void*,const char*,sqlite3_uint64), void*); |
| 3065 | +SQLITE_API SQLITE_DEPRECATED void *SQLITE_APICALL sqlite3_trace(sqlite3*, |
| 3066 | + void(SQLITE_CALLBACK *xTrace)(void*,const char*), void*); |
| 3067 | +SQLITE_API SQLITE_DEPRECATED void *SQLITE_APICALL sqlite3_profile(sqlite3*, |
| 3068 | + void(SQLITE_CALLBACK *xProfile)(void*,const char*,sqlite3_uint64), void*); |
| 3042 | 3069 | |
| 3043 | 3070 | /* |
| 3044 | 3071 | ** CAPI3REF: SQL Trace Event Codes |
| 3045 | 3072 | ** KEYWORDS: SQLITE_TRACE |
| 3046 | 3073 | ** |
| | @@ -3124,14 +3151,14 @@ |
| 3124 | 3151 | ** |
| 3125 | 3152 | ** The sqlite3_trace_v2() interface is intended to replace the legacy |
| 3126 | 3153 | ** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which |
| 3127 | 3154 | ** are deprecated. |
| 3128 | 3155 | */ |
| 3129 | | -SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2( |
| 3156 | +SQLITE_API int SQLITE_APICALL sqlite3_trace_v2( |
| 3130 | 3157 | sqlite3*, |
| 3131 | 3158 | unsigned uMask, |
| 3132 | | - int(*xCallback)(unsigned,void*,void*,void*), |
| 3159 | + int(SQLITE_CALLBACK *xCallback)(unsigned,void*,void*,void*), |
| 3133 | 3160 | void *pCtx |
| 3134 | 3161 | ); |
| 3135 | 3162 | |
| 3136 | 3163 | /* |
| 3137 | 3164 | ** CAPI3REF: Query Progress Callbacks |
| | @@ -3163,11 +3190,11 @@ |
| 3163 | 3190 | ** the database connection that invoked the progress handler. |
| 3164 | 3191 | ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their |
| 3165 | 3192 | ** database connections for the meaning of "modify" in this paragraph. |
| 3166 | 3193 | ** |
| 3167 | 3194 | */ |
| 3168 | | -SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); |
| 3195 | +SQLITE_API void SQLITE_APICALL sqlite3_progress_handler(sqlite3*, int, int(SQLITE_CALLBACK *)(void*), void*); |
| 3169 | 3196 | |
| 3170 | 3197 | /* |
| 3171 | 3198 | ** CAPI3REF: Opening A New Database Connection |
| 3172 | 3199 | ** CONSTRUCTOR: sqlite3 |
| 3173 | 3200 | ** |
| | @@ -3392,19 +3419,19 @@ |
| 3392 | 3419 | ** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various |
| 3393 | 3420 | ** features that require the use of temporary files may fail. |
| 3394 | 3421 | ** |
| 3395 | 3422 | ** See also: [sqlite3_temp_directory] |
| 3396 | 3423 | */ |
| 3397 | | -SQLITE_API int SQLITE_STDCALL sqlite3_open( |
| 3424 | +SQLITE_API int SQLITE_APICALL sqlite3_open( |
| 3398 | 3425 | const char *filename, /* Database filename (UTF-8) */ |
| 3399 | 3426 | sqlite3 **ppDb /* OUT: SQLite db handle */ |
| 3400 | 3427 | ); |
| 3401 | | -SQLITE_API int SQLITE_STDCALL sqlite3_open16( |
| 3428 | +SQLITE_API int SQLITE_APICALL sqlite3_open16( |
| 3402 | 3429 | const void *filename, /* Database filename (UTF-16) */ |
| 3403 | 3430 | sqlite3 **ppDb /* OUT: SQLite db handle */ |
| 3404 | 3431 | ); |
| 3405 | | -SQLITE_API int SQLITE_STDCALL sqlite3_open_v2( |
| 3432 | +SQLITE_API int SQLITE_APICALL sqlite3_open_v2( |
| 3406 | 3433 | const char *filename, /* Database filename (UTF-8) */ |
| 3407 | 3434 | sqlite3 **ppDb, /* OUT: SQLite db handle */ |
| 3408 | 3435 | int flags, /* Flags */ |
| 3409 | 3436 | const char *zVfs /* Name of VFS module to use */ |
| 3410 | 3437 | ); |
| | @@ -3446,13 +3473,13 @@ |
| 3446 | 3473 | ** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and |
| 3447 | 3474 | ** is not a database file pathname pointer that SQLite passed into the xOpen |
| 3448 | 3475 | ** VFS method, then the behavior of this routine is undefined and probably |
| 3449 | 3476 | ** undesirable. |
| 3450 | 3477 | */ |
| 3451 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam); |
| 3452 | | -SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault); |
| 3453 | | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64(const char*, const char*, sqlite3_int64); |
| 3478 | +SQLITE_API const char *SQLITE_APICALL sqlite3_uri_parameter(const char *zFilename, const char *zParam); |
| 3479 | +SQLITE_API int SQLITE_APICALL sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault); |
| 3480 | +SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_uri_int64(const char*, const char*, sqlite3_int64); |
| 3454 | 3481 | |
| 3455 | 3482 | |
| 3456 | 3483 | /* |
| 3457 | 3484 | ** CAPI3REF: Error Codes And Messages |
| 3458 | 3485 | ** METHOD: sqlite3 |
| | @@ -3492,15 +3519,15 @@ |
| 3492 | 3519 | ** |
| 3493 | 3520 | ** If an interface fails with SQLITE_MISUSE, that means the interface |
| 3494 | 3521 | ** was invoked incorrectly by the application. In that case, the |
| 3495 | 3522 | ** error code and message may or may not be set. |
| 3496 | 3523 | */ |
| 3497 | | -SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db); |
| 3498 | | -SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db); |
| 3499 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3*); |
| 3500 | | -SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3*); |
| 3501 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int); |
| 3524 | +SQLITE_API int SQLITE_APICALL sqlite3_errcode(sqlite3 *db); |
| 3525 | +SQLITE_API int SQLITE_APICALL sqlite3_extended_errcode(sqlite3 *db); |
| 3526 | +SQLITE_API const char *SQLITE_APICALL sqlite3_errmsg(sqlite3*); |
| 3527 | +SQLITE_API const void *SQLITE_APICALL sqlite3_errmsg16(sqlite3*); |
| 3528 | +SQLITE_API const char *SQLITE_APICALL sqlite3_errstr(int); |
| 3502 | 3529 | |
| 3503 | 3530 | /* |
| 3504 | 3531 | ** CAPI3REF: Prepared Statement Object |
| 3505 | 3532 | ** KEYWORDS: {prepared statement} {prepared statements} |
| 3506 | 3533 | ** |
| | @@ -3564,11 +3591,11 @@ |
| 3564 | 3591 | ** created by an untrusted script can be contained using the |
| 3565 | 3592 | ** [max_page_count] [PRAGMA]. |
| 3566 | 3593 | ** |
| 3567 | 3594 | ** New run-time limit categories may be added in future releases. |
| 3568 | 3595 | */ |
| 3569 | | -SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal); |
| 3596 | +SQLITE_API int SQLITE_APICALL sqlite3_limit(sqlite3*, int id, int newVal); |
| 3570 | 3597 | |
| 3571 | 3598 | /* |
| 3572 | 3599 | ** CAPI3REF: Run-Time Limit Categories |
| 3573 | 3600 | ** KEYWORDS: {limit category} {*limit categories} |
| 3574 | 3601 | ** |
| | @@ -3716,32 +3743,32 @@ |
| 3716 | 3743 | ** or [GLOB] operator or if the parameter is compared to an indexed column |
| 3717 | 3744 | ** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled. |
| 3718 | 3745 | ** </li> |
| 3719 | 3746 | ** </ol> |
| 3720 | 3747 | */ |
| 3721 | | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare( |
| 3748 | +SQLITE_API int SQLITE_APICALL sqlite3_prepare( |
| 3722 | 3749 | sqlite3 *db, /* Database handle */ |
| 3723 | 3750 | const char *zSql, /* SQL statement, UTF-8 encoded */ |
| 3724 | 3751 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3725 | 3752 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3726 | 3753 | const char **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3727 | 3754 | ); |
| 3728 | | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2( |
| 3755 | +SQLITE_API int SQLITE_APICALL sqlite3_prepare_v2( |
| 3729 | 3756 | sqlite3 *db, /* Database handle */ |
| 3730 | 3757 | const char *zSql, /* SQL statement, UTF-8 encoded */ |
| 3731 | 3758 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3732 | 3759 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3733 | 3760 | const char **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3734 | 3761 | ); |
| 3735 | | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare16( |
| 3762 | +SQLITE_API int SQLITE_APICALL sqlite3_prepare16( |
| 3736 | 3763 | sqlite3 *db, /* Database handle */ |
| 3737 | 3764 | const void *zSql, /* SQL statement, UTF-16 encoded */ |
| 3738 | 3765 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3739 | 3766 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3740 | 3767 | const void **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3741 | 3768 | ); |
| 3742 | | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2( |
| 3769 | +SQLITE_API int SQLITE_APICALL sqlite3_prepare16_v2( |
| 3743 | 3770 | sqlite3 *db, /* Database handle */ |
| 3744 | 3771 | const void *zSql, /* SQL statement, UTF-16 encoded */ |
| 3745 | 3772 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3746 | 3773 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3747 | 3774 | const void **pzTail /* OUT: Pointer to unused portion of zSql */ |
| | @@ -3776,12 +3803,12 @@ |
| 3776 | 3803 | ** automatically freed when the prepared statement is finalized. |
| 3777 | 3804 | ** ^The string returned by sqlite3_expanded_sql(P), on the other hand, |
| 3778 | 3805 | ** is obtained from [sqlite3_malloc()] and must be free by the application |
| 3779 | 3806 | ** by passing it to [sqlite3_free()]. |
| 3780 | 3807 | */ |
| 3781 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt); |
| 3782 | | -SQLITE_API char *SQLITE_STDCALL sqlite3_expanded_sql(sqlite3_stmt *pStmt); |
| 3808 | +SQLITE_API const char *SQLITE_APICALL sqlite3_sql(sqlite3_stmt *pStmt); |
| 3809 | +SQLITE_API char *SQLITE_APICALL sqlite3_expanded_sql(sqlite3_stmt *pStmt); |
| 3783 | 3810 | |
| 3784 | 3811 | /* |
| 3785 | 3812 | ** CAPI3REF: Determine If An SQL Statement Writes The Database |
| 3786 | 3813 | ** METHOD: sqlite3_stmt |
| 3787 | 3814 | ** |
| | @@ -3809,11 +3836,11 @@ |
| 3809 | 3836 | ** database. ^The [ATTACH] and [DETACH] statements also cause |
| 3810 | 3837 | ** sqlite3_stmt_readonly() to return true since, while those statements |
| 3811 | 3838 | ** change the configuration of a database connection, they do not make |
| 3812 | 3839 | ** changes to the content of the database files on disk. |
| 3813 | 3840 | */ |
| 3814 | | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt); |
| 3841 | +SQLITE_API int SQLITE_APICALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt); |
| 3815 | 3842 | |
| 3816 | 3843 | /* |
| 3817 | 3844 | ** CAPI3REF: Determine If A Prepared Statement Has Been Reset |
| 3818 | 3845 | ** METHOD: sqlite3_stmt |
| 3819 | 3846 | ** |
| | @@ -3830,11 +3857,11 @@ |
| 3830 | 3857 | ** to locate all prepared statements associated with a database |
| 3831 | 3858 | ** connection that are in need of being reset. This can be used, |
| 3832 | 3859 | ** for example, in diagnostic routines to search for prepared |
| 3833 | 3860 | ** statements that are holding a transaction open. |
| 3834 | 3861 | */ |
| 3835 | | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt*); |
| 3862 | +SQLITE_API int SQLITE_APICALL sqlite3_stmt_busy(sqlite3_stmt*); |
| 3836 | 3863 | |
| 3837 | 3864 | /* |
| 3838 | 3865 | ** CAPI3REF: Dynamically Typed Value Object |
| 3839 | 3866 | ** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value} |
| 3840 | 3867 | ** |
| | @@ -3994,24 +4021,24 @@ |
| 3994 | 4021 | ** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails. |
| 3995 | 4022 | ** |
| 3996 | 4023 | ** See also: [sqlite3_bind_parameter_count()], |
| 3997 | 4024 | ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()]. |
| 3998 | 4025 | */ |
| 3999 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*)); |
| 4000 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64, |
| 4001 | | - void(*)(void*)); |
| 4002 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt*, int, double); |
| 4003 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt*, int, int); |
| 4004 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64); |
| 4005 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt*, int); |
| 4006 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*)); |
| 4007 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*)); |
| 4008 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64, |
| 4009 | | - void(*)(void*), unsigned char encoding); |
| 4010 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); |
| 4011 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); |
| 4012 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64); |
| 4026 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(SQLITE_CALLBACK *)(void*)); |
| 4027 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64, |
| 4028 | + void(SQLITE_CALLBACK *)(void*)); |
| 4029 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_double(sqlite3_stmt*, int, double); |
| 4030 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_int(sqlite3_stmt*, int, int); |
| 4031 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64); |
| 4032 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_null(sqlite3_stmt*, int); |
| 4033 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(SQLITE_CALLBACK *)(void*)); |
| 4034 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(SQLITE_CALLBACK *)(void*)); |
| 4035 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64, |
| 4036 | + void(SQLITE_CALLBACK *)(void*), unsigned char encoding); |
| 4037 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); |
| 4038 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); |
| 4039 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64); |
| 4013 | 4040 | |
| 4014 | 4041 | /* |
| 4015 | 4042 | ** CAPI3REF: Number Of SQL Parameters |
| 4016 | 4043 | ** METHOD: sqlite3_stmt |
| 4017 | 4044 | ** |
| | @@ -4028,11 +4055,11 @@ |
| 4028 | 4055 | ** |
| 4029 | 4056 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 4030 | 4057 | ** [sqlite3_bind_parameter_name()], and |
| 4031 | 4058 | ** [sqlite3_bind_parameter_index()]. |
| 4032 | 4059 | */ |
| 4033 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt*); |
| 4060 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_parameter_count(sqlite3_stmt*); |
| 4034 | 4061 | |
| 4035 | 4062 | /* |
| 4036 | 4063 | ** CAPI3REF: Name Of A Host Parameter |
| 4037 | 4064 | ** METHOD: sqlite3_stmt |
| 4038 | 4065 | ** |
| | @@ -4056,11 +4083,11 @@ |
| 4056 | 4083 | ** |
| 4057 | 4084 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 4058 | 4085 | ** [sqlite3_bind_parameter_count()], and |
| 4059 | 4086 | ** [sqlite3_bind_parameter_index()]. |
| 4060 | 4087 | */ |
| 4061 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt*, int); |
| 4088 | +SQLITE_API const char *SQLITE_APICALL sqlite3_bind_parameter_name(sqlite3_stmt*, int); |
| 4062 | 4089 | |
| 4063 | 4090 | /* |
| 4064 | 4091 | ** CAPI3REF: Index Of A Parameter With A Given Name |
| 4065 | 4092 | ** METHOD: sqlite3_stmt |
| 4066 | 4093 | ** |
| | @@ -4073,21 +4100,21 @@ |
| 4073 | 4100 | ** |
| 4074 | 4101 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 4075 | 4102 | ** [sqlite3_bind_parameter_count()], and |
| 4076 | 4103 | ** [sqlite3_bind_parameter_name()]. |
| 4077 | 4104 | */ |
| 4078 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName); |
| 4105 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName); |
| 4079 | 4106 | |
| 4080 | 4107 | /* |
| 4081 | 4108 | ** CAPI3REF: Reset All Bindings On A Prepared Statement |
| 4082 | 4109 | ** METHOD: sqlite3_stmt |
| 4083 | 4110 | ** |
| 4084 | 4111 | ** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset |
| 4085 | 4112 | ** the [sqlite3_bind_blob | bindings] on a [prepared statement]. |
| 4086 | 4113 | ** ^Use this routine to reset all host parameters to NULL. |
| 4087 | 4114 | */ |
| 4088 | | -SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt*); |
| 4115 | +SQLITE_API int SQLITE_APICALL sqlite3_clear_bindings(sqlite3_stmt*); |
| 4089 | 4116 | |
| 4090 | 4117 | /* |
| 4091 | 4118 | ** CAPI3REF: Number Of Columns In A Result Set |
| 4092 | 4119 | ** METHOD: sqlite3_stmt |
| 4093 | 4120 | ** |
| | @@ -4095,11 +4122,11 @@ |
| 4095 | 4122 | ** [prepared statement]. ^This routine returns 0 if pStmt is an SQL |
| 4096 | 4123 | ** statement that does not return data (for example an [UPDATE]). |
| 4097 | 4124 | ** |
| 4098 | 4125 | ** See also: [sqlite3_data_count()] |
| 4099 | 4126 | */ |
| 4100 | | -SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt); |
| 4127 | +SQLITE_API int SQLITE_APICALL sqlite3_column_count(sqlite3_stmt *pStmt); |
| 4101 | 4128 | |
| 4102 | 4129 | /* |
| 4103 | 4130 | ** CAPI3REF: Column Names In A Result Set |
| 4104 | 4131 | ** METHOD: sqlite3_stmt |
| 4105 | 4132 | ** |
| | @@ -4124,12 +4151,12 @@ |
| 4124 | 4151 | ** ^The name of a result column is the value of the "AS" clause for |
| 4125 | 4152 | ** that column, if there is an AS clause. If there is no AS clause |
| 4126 | 4153 | ** then the name of the column is unspecified and may change from |
| 4127 | 4154 | ** one release of SQLite to the next. |
| 4128 | 4155 | */ |
| 4129 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt*, int N); |
| 4130 | | -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt*, int N); |
| 4156 | +SQLITE_API const char *SQLITE_APICALL sqlite3_column_name(sqlite3_stmt*, int N); |
| 4157 | +SQLITE_API const void *SQLITE_APICALL sqlite3_column_name16(sqlite3_stmt*, int N); |
| 4131 | 4158 | |
| 4132 | 4159 | /* |
| 4133 | 4160 | ** CAPI3REF: Source Of Data In A Query Result |
| 4134 | 4161 | ** METHOD: sqlite3_stmt |
| 4135 | 4162 | ** |
| | @@ -4173,16 +4200,16 @@ |
| 4173 | 4200 | ** If two or more threads call one or more |
| 4174 | 4201 | ** [sqlite3_column_database_name | column metadata interfaces] |
| 4175 | 4202 | ** for the same [prepared statement] and result column |
| 4176 | 4203 | ** at the same time then the results are undefined. |
| 4177 | 4204 | */ |
| 4178 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt*,int); |
| 4179 | | -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt*,int); |
| 4180 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt*,int); |
| 4181 | | -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt*,int); |
| 4182 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt*,int); |
| 4183 | | -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt*,int); |
| 4205 | +SQLITE_API const char *SQLITE_APICALL sqlite3_column_database_name(sqlite3_stmt*,int); |
| 4206 | +SQLITE_API const void *SQLITE_APICALL sqlite3_column_database_name16(sqlite3_stmt*,int); |
| 4207 | +SQLITE_API const char *SQLITE_APICALL sqlite3_column_table_name(sqlite3_stmt*,int); |
| 4208 | +SQLITE_API const void *SQLITE_APICALL sqlite3_column_table_name16(sqlite3_stmt*,int); |
| 4209 | +SQLITE_API const char *SQLITE_APICALL sqlite3_column_origin_name(sqlite3_stmt*,int); |
| 4210 | +SQLITE_API const void *SQLITE_APICALL sqlite3_column_origin_name16(sqlite3_stmt*,int); |
| 4184 | 4211 | |
| 4185 | 4212 | /* |
| 4186 | 4213 | ** CAPI3REF: Declared Datatype Of A Query Result |
| 4187 | 4214 | ** METHOD: sqlite3_stmt |
| 4188 | 4215 | ** |
| | @@ -4210,12 +4237,12 @@ |
| 4210 | 4237 | ** data stored in that column is of the declared type. SQLite is |
| 4211 | 4238 | ** strongly typed, but the typing is dynamic not static. ^Type |
| 4212 | 4239 | ** is associated with individual values, not with the containers |
| 4213 | 4240 | ** used to hold those values. |
| 4214 | 4241 | */ |
| 4215 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt*,int); |
| 4216 | | -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt*,int); |
| 4242 | +SQLITE_API const char *SQLITE_APICALL sqlite3_column_decltype(sqlite3_stmt*,int); |
| 4243 | +SQLITE_API const void *SQLITE_APICALL sqlite3_column_decltype16(sqlite3_stmt*,int); |
| 4217 | 4244 | |
| 4218 | 4245 | /* |
| 4219 | 4246 | ** CAPI3REF: Evaluate An SQL Statement |
| 4220 | 4247 | ** METHOD: sqlite3_stmt |
| 4221 | 4248 | ** |
| | @@ -4291,11 +4318,11 @@ |
| 4291 | 4318 | ** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead |
| 4292 | 4319 | ** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces, |
| 4293 | 4320 | ** then the more specific [error codes] are returned directly |
| 4294 | 4321 | ** by sqlite3_step(). The use of the "v2" interface is recommended. |
| 4295 | 4322 | */ |
| 4296 | | -SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt*); |
| 4323 | +SQLITE_API int SQLITE_APICALL sqlite3_step(sqlite3_stmt*); |
| 4297 | 4324 | |
| 4298 | 4325 | /* |
| 4299 | 4326 | ** CAPI3REF: Number of columns in a result set |
| 4300 | 4327 | ** METHOD: sqlite3_stmt |
| 4301 | 4328 | ** |
| | @@ -4312,11 +4339,11 @@ |
| 4312 | 4339 | ** where it always returns zero since each step of that multi-step |
| 4313 | 4340 | ** pragma returns 0 columns of data. |
| 4314 | 4341 | ** |
| 4315 | 4342 | ** See also: [sqlite3_column_count()] |
| 4316 | 4343 | */ |
| 4317 | | -SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt); |
| 4344 | +SQLITE_API int SQLITE_APICALL sqlite3_data_count(sqlite3_stmt *pStmt); |
| 4318 | 4345 | |
| 4319 | 4346 | /* |
| 4320 | 4347 | ** CAPI3REF: Fundamental Datatypes |
| 4321 | 4348 | ** KEYWORDS: SQLITE_TEXT |
| 4322 | 4349 | ** |
| | @@ -4502,20 +4529,20 @@ |
| 4502 | 4529 | ** of these routines, a default value is returned. The default value |
| 4503 | 4530 | ** is either the integer 0, the floating point number 0.0, or a NULL |
| 4504 | 4531 | ** pointer. Subsequent calls to [sqlite3_errcode()] will return |
| 4505 | 4532 | ** [SQLITE_NOMEM].)^ |
| 4506 | 4533 | */ |
| 4507 | | -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt*, int iCol); |
| 4508 | | -SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt*, int iCol); |
| 4509 | | -SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt*, int iCol); |
| 4510 | | -SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt*, int iCol); |
| 4511 | | -SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt*, int iCol); |
| 4512 | | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt*, int iCol); |
| 4513 | | -SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt*, int iCol); |
| 4514 | | -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt*, int iCol); |
| 4515 | | -SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt*, int iCol); |
| 4516 | | -SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt*, int iCol); |
| 4534 | +SQLITE_API const void *SQLITE_APICALL sqlite3_column_blob(sqlite3_stmt*, int iCol); |
| 4535 | +SQLITE_API int SQLITE_APICALL sqlite3_column_bytes(sqlite3_stmt*, int iCol); |
| 4536 | +SQLITE_API int SQLITE_APICALL sqlite3_column_bytes16(sqlite3_stmt*, int iCol); |
| 4537 | +SQLITE_API double SQLITE_APICALL sqlite3_column_double(sqlite3_stmt*, int iCol); |
| 4538 | +SQLITE_API int SQLITE_APICALL sqlite3_column_int(sqlite3_stmt*, int iCol); |
| 4539 | +SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_column_int64(sqlite3_stmt*, int iCol); |
| 4540 | +SQLITE_API const unsigned char *SQLITE_APICALL sqlite3_column_text(sqlite3_stmt*, int iCol); |
| 4541 | +SQLITE_API const void *SQLITE_APICALL sqlite3_column_text16(sqlite3_stmt*, int iCol); |
| 4542 | +SQLITE_API int SQLITE_APICALL sqlite3_column_type(sqlite3_stmt*, int iCol); |
| 4543 | +SQLITE_API sqlite3_value *SQLITE_APICALL sqlite3_column_value(sqlite3_stmt*, int iCol); |
| 4517 | 4544 | |
| 4518 | 4545 | /* |
| 4519 | 4546 | ** CAPI3REF: Destroy A Prepared Statement Object |
| 4520 | 4547 | ** DESTRUCTOR: sqlite3_stmt |
| 4521 | 4548 | ** |
| | @@ -4539,11 +4566,11 @@ |
| 4539 | 4566 | ** resource leaks. It is a grievous error for the application to try to use |
| 4540 | 4567 | ** a prepared statement after it has been finalized. Any use of a prepared |
| 4541 | 4568 | ** statement after it has been finalized can result in undefined and |
| 4542 | 4569 | ** undesirable behavior such as segfaults and heap corruption. |
| 4543 | 4570 | */ |
| 4544 | | -SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt); |
| 4571 | +SQLITE_API int SQLITE_APICALL sqlite3_finalize(sqlite3_stmt *pStmt); |
| 4545 | 4572 | |
| 4546 | 4573 | /* |
| 4547 | 4574 | ** CAPI3REF: Reset A Prepared Statement Object |
| 4548 | 4575 | ** METHOD: sqlite3_stmt |
| 4549 | 4576 | ** |
| | @@ -4566,11 +4593,11 @@ |
| 4566 | 4593 | ** [sqlite3_reset(S)] returns an appropriate [error code]. |
| 4567 | 4594 | ** |
| 4568 | 4595 | ** ^The [sqlite3_reset(S)] interface does not change the values |
| 4569 | 4596 | ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. |
| 4570 | 4597 | */ |
| 4571 | | -SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt); |
| 4598 | +SQLITE_API int SQLITE_APICALL sqlite3_reset(sqlite3_stmt *pStmt); |
| 4572 | 4599 | |
| 4573 | 4600 | /* |
| 4574 | 4601 | ** CAPI3REF: Create Or Redefine SQL Functions |
| 4575 | 4602 | ** KEYWORDS: {function creation routines} |
| 4576 | 4603 | ** KEYWORDS: {application-defined SQL function} |
| | @@ -4666,40 +4693,40 @@ |
| 4666 | 4693 | ** ^An application-defined function is permitted to call other |
| 4667 | 4694 | ** SQLite interfaces. However, such calls must not |
| 4668 | 4695 | ** close the database connection nor finalize or reset the prepared |
| 4669 | 4696 | ** statement in which the function is running. |
| 4670 | 4697 | */ |
| 4671 | | -SQLITE_API int SQLITE_STDCALL sqlite3_create_function( |
| 4698 | +SQLITE_API int SQLITE_APICALL sqlite3_create_function( |
| 4672 | 4699 | sqlite3 *db, |
| 4673 | 4700 | const char *zFunctionName, |
| 4674 | 4701 | int nArg, |
| 4675 | 4702 | int eTextRep, |
| 4676 | 4703 | void *pApp, |
| 4677 | | - void (*xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4678 | | - void (*xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4679 | | - void (*xFinal)(sqlite3_context*) |
| 4704 | + void (SQLITE_CALLBACK *xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4705 | + void (SQLITE_CALLBACK *xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4706 | + void (SQLITE_CALLBACK *xFinal)(sqlite3_context*) |
| 4680 | 4707 | ); |
| 4681 | | -SQLITE_API int SQLITE_STDCALL sqlite3_create_function16( |
| 4708 | +SQLITE_API int SQLITE_APICALL sqlite3_create_function16( |
| 4682 | 4709 | sqlite3 *db, |
| 4683 | 4710 | const void *zFunctionName, |
| 4684 | 4711 | int nArg, |
| 4685 | 4712 | int eTextRep, |
| 4686 | 4713 | void *pApp, |
| 4687 | | - void (*xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4688 | | - void (*xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4689 | | - void (*xFinal)(sqlite3_context*) |
| 4714 | + void (SQLITE_CALLBACK *xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4715 | + void (SQLITE_CALLBACK *xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4716 | + void (SQLITE_CALLBACK *xFinal)(sqlite3_context*) |
| 4690 | 4717 | ); |
| 4691 | | -SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2( |
| 4718 | +SQLITE_API int SQLITE_APICALL sqlite3_create_function_v2( |
| 4692 | 4719 | sqlite3 *db, |
| 4693 | 4720 | const char *zFunctionName, |
| 4694 | 4721 | int nArg, |
| 4695 | 4722 | int eTextRep, |
| 4696 | 4723 | void *pApp, |
| 4697 | | - void (*xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4698 | | - void (*xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4699 | | - void (*xFinal)(sqlite3_context*), |
| 4700 | | - void(*xDestroy)(void*) |
| 4724 | + void (SQLITE_CALLBACK *xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4725 | + void (SQLITE_CALLBACK *xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4726 | + void (SQLITE_CALLBACK *xFinal)(sqlite3_context*), |
| 4727 | + void(SQLITE_CALLBACK *xDestroy)(void*) |
| 4701 | 4728 | ); |
| 4702 | 4729 | |
| 4703 | 4730 | /* |
| 4704 | 4731 | ** CAPI3REF: Text Encodings |
| 4705 | 4732 | ** |
| | @@ -4732,16 +4759,16 @@ |
| 4732 | 4759 | ** to be supported. However, new applications should avoid |
| 4733 | 4760 | ** the use of these functions. To encourage programmers to avoid |
| 4734 | 4761 | ** these functions, we will not explain what they do. |
| 4735 | 4762 | */ |
| 4736 | 4763 | #ifndef SQLITE_OMIT_DEPRECATED |
| 4737 | | -SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context*); |
| 4738 | | -SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt*); |
| 4739 | | -SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); |
| 4740 | | -SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_global_recover(void); |
| 4741 | | -SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_thread_cleanup(void); |
| 4742 | | -SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int), |
| 4764 | +SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_aggregate_count(sqlite3_context*); |
| 4765 | +SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_expired(sqlite3_stmt*); |
| 4766 | +SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); |
| 4767 | +SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_global_recover(void); |
| 4768 | +SQLITE_API SQLITE_DEPRECATED void SQLITE_APICALL sqlite3_thread_cleanup(void); |
| 4769 | +SQLITE_API SQLITE_DEPRECATED int SQLITE_APICALL sqlite3_memory_alarm(void(SQLITE_CALLBACK *)(void*,sqlite3_int64,int), |
| 4743 | 4770 | void*,sqlite3_int64); |
| 4744 | 4771 | #endif |
| 4745 | 4772 | |
| 4746 | 4773 | /* |
| 4747 | 4774 | ** CAPI3REF: Obtaining SQL Values |
| | @@ -4787,22 +4814,22 @@ |
| 4787 | 4814 | ** or [sqlite3_value_text16()]. |
| 4788 | 4815 | ** |
| 4789 | 4816 | ** These routines must be called from the same thread as |
| 4790 | 4817 | ** the SQL function that supplied the [sqlite3_value*] parameters. |
| 4791 | 4818 | */ |
| 4792 | | -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value*); |
| 4793 | | -SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value*); |
| 4794 | | -SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value*); |
| 4795 | | -SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value*); |
| 4796 | | -SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value*); |
| 4797 | | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value*); |
| 4798 | | -SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value*); |
| 4799 | | -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value*); |
| 4800 | | -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value*); |
| 4801 | | -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value*); |
| 4802 | | -SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value*); |
| 4803 | | -SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value*); |
| 4819 | +SQLITE_API const void *SQLITE_APICALL sqlite3_value_blob(sqlite3_value*); |
| 4820 | +SQLITE_API int SQLITE_APICALL sqlite3_value_bytes(sqlite3_value*); |
| 4821 | +SQLITE_API int SQLITE_APICALL sqlite3_value_bytes16(sqlite3_value*); |
| 4822 | +SQLITE_API double SQLITE_APICALL sqlite3_value_double(sqlite3_value*); |
| 4823 | +SQLITE_API int SQLITE_APICALL sqlite3_value_int(sqlite3_value*); |
| 4824 | +SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_value_int64(sqlite3_value*); |
| 4825 | +SQLITE_API const unsigned char *SQLITE_APICALL sqlite3_value_text(sqlite3_value*); |
| 4826 | +SQLITE_API const void *SQLITE_APICALL sqlite3_value_text16(sqlite3_value*); |
| 4827 | +SQLITE_API const void *SQLITE_APICALL sqlite3_value_text16le(sqlite3_value*); |
| 4828 | +SQLITE_API const void *SQLITE_APICALL sqlite3_value_text16be(sqlite3_value*); |
| 4829 | +SQLITE_API int SQLITE_APICALL sqlite3_value_type(sqlite3_value*); |
| 4830 | +SQLITE_API int SQLITE_APICALL sqlite3_value_numeric_type(sqlite3_value*); |
| 4804 | 4831 | |
| 4805 | 4832 | /* |
| 4806 | 4833 | ** CAPI3REF: Finding The Subtype Of SQL Values |
| 4807 | 4834 | ** METHOD: sqlite3_value |
| 4808 | 4835 | ** |
| | @@ -4814,11 +4841,11 @@ |
| 4814 | 4841 | ** |
| 4815 | 4842 | ** SQLite makes no use of subtype itself. It merely passes the subtype |
| 4816 | 4843 | ** from the result of one [application-defined SQL function] into the |
| 4817 | 4844 | ** input of another. |
| 4818 | 4845 | */ |
| 4819 | | -SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*); |
| 4846 | +SQLITE_API unsigned int SQLITE_APICALL sqlite3_value_subtype(sqlite3_value*); |
| 4820 | 4847 | |
| 4821 | 4848 | /* |
| 4822 | 4849 | ** CAPI3REF: Copy And Free SQL Values |
| 4823 | 4850 | ** METHOD: sqlite3_value |
| 4824 | 4851 | ** |
| | @@ -4830,12 +4857,12 @@ |
| 4830 | 4857 | ** |
| 4831 | 4858 | ** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object |
| 4832 | 4859 | ** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer |
| 4833 | 4860 | ** then sqlite3_value_free(V) is a harmless no-op. |
| 4834 | 4861 | */ |
| 4835 | | -SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value*); |
| 4836 | | -SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value*); |
| 4862 | +SQLITE_API sqlite3_value *SQLITE_APICALL sqlite3_value_dup(const sqlite3_value*); |
| 4863 | +SQLITE_API void SQLITE_APICALL sqlite3_value_free(sqlite3_value*); |
| 4837 | 4864 | |
| 4838 | 4865 | /* |
| 4839 | 4866 | ** CAPI3REF: Obtain Aggregate Function Context |
| 4840 | 4867 | ** METHOD: sqlite3_context |
| 4841 | 4868 | ** |
| | @@ -4876,11 +4903,11 @@ |
| 4876 | 4903 | ** function. |
| 4877 | 4904 | ** |
| 4878 | 4905 | ** This routine must be called from the same thread in which |
| 4879 | 4906 | ** the aggregate SQL function is running. |
| 4880 | 4907 | */ |
| 4881 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context*, int nBytes); |
| 4908 | +SQLITE_API void *SQLITE_APICALL sqlite3_aggregate_context(sqlite3_context*, int nBytes); |
| 4882 | 4909 | |
| 4883 | 4910 | /* |
| 4884 | 4911 | ** CAPI3REF: User Data For Functions |
| 4885 | 4912 | ** METHOD: sqlite3_context |
| 4886 | 4913 | ** |
| | @@ -4891,11 +4918,11 @@ |
| 4891 | 4918 | ** registered the application defined function. |
| 4892 | 4919 | ** |
| 4893 | 4920 | ** This routine must be called from the same thread in which |
| 4894 | 4921 | ** the application-defined function is running. |
| 4895 | 4922 | */ |
| 4896 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context*); |
| 4923 | +SQLITE_API void *SQLITE_APICALL sqlite3_user_data(sqlite3_context*); |
| 4897 | 4924 | |
| 4898 | 4925 | /* |
| 4899 | 4926 | ** CAPI3REF: Database Connection For Functions |
| 4900 | 4927 | ** METHOD: sqlite3_context |
| 4901 | 4928 | ** |
| | @@ -4903,11 +4930,11 @@ |
| 4903 | 4930 | ** the pointer to the [database connection] (the 1st parameter) |
| 4904 | 4931 | ** of the [sqlite3_create_function()] |
| 4905 | 4932 | ** and [sqlite3_create_function16()] routines that originally |
| 4906 | 4933 | ** registered the application defined function. |
| 4907 | 4934 | */ |
| 4908 | | -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*); |
| 4935 | +SQLITE_API sqlite3 *SQLITE_APICALL sqlite3_context_db_handle(sqlite3_context*); |
| 4909 | 4936 | |
| 4910 | 4937 | /* |
| 4911 | 4938 | ** CAPI3REF: Function Auxiliary Data |
| 4912 | 4939 | ** METHOD: sqlite3_context |
| 4913 | 4940 | ** |
| | @@ -4956,12 +4983,12 @@ |
| 4956 | 4983 | ** values and [parameters] and expressions composed from the same.)^ |
| 4957 | 4984 | ** |
| 4958 | 4985 | ** These routines must be called from the same thread in which |
| 4959 | 4986 | ** the SQL function is running. |
| 4960 | 4987 | */ |
| 4961 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context*, int N); |
| 4962 | | -SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*)); |
| 4988 | +SQLITE_API void *SQLITE_APICALL sqlite3_get_auxdata(sqlite3_context*, int N); |
| 4989 | +SQLITE_API void SQLITE_APICALL sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (SQLITE_CALLBACK *)(void*)); |
| 4963 | 4990 | |
| 4964 | 4991 | |
| 4965 | 4992 | /* |
| 4966 | 4993 | ** CAPI3REF: Constants Defining Special Destructor Behavior |
| 4967 | 4994 | ** |
| | @@ -4974,11 +5001,11 @@ |
| 4974 | 5001 | ** the content before returning. |
| 4975 | 5002 | ** |
| 4976 | 5003 | ** The typedef is necessary to work around problems in certain |
| 4977 | 5004 | ** C++ compilers. |
| 4978 | 5005 | */ |
| 4979 | | -typedef void (*sqlite3_destructor_type)(void*); |
| 5006 | +typedef void (SQLITE_CALLBACK *sqlite3_destructor_type)(void*); |
| 4980 | 5007 | #define SQLITE_STATIC ((sqlite3_destructor_type)0) |
| 4981 | 5008 | #define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1) |
| 4982 | 5009 | |
| 4983 | 5010 | /* |
| 4984 | 5011 | ** CAPI3REF: Setting The Result Of An SQL Function |
| | @@ -5093,31 +5120,31 @@ |
| 5093 | 5120 | ** |
| 5094 | 5121 | ** If these routines are called from within the different thread |
| 5095 | 5122 | ** than the one containing the application-defined function that received |
| 5096 | 5123 | ** the [sqlite3_context] pointer, the results are undefined. |
| 5097 | 5124 | */ |
| 5098 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*)); |
| 5099 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64(sqlite3_context*,const void*, |
| 5100 | | - sqlite3_uint64,void(*)(void*)); |
| 5101 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context*, double); |
| 5102 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context*, const char*, int); |
| 5103 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context*, const void*, int); |
| 5104 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context*); |
| 5105 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context*); |
| 5106 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context*, int); |
| 5107 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context*, int); |
| 5108 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context*, sqlite3_int64); |
| 5109 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context*); |
| 5110 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*)); |
| 5111 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64, |
| 5112 | | - void(*)(void*), unsigned char encoding); |
| 5113 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*)); |
| 5114 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*)); |
| 5115 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*)); |
| 5116 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*); |
| 5117 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n); |
| 5118 | | -SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n); |
| 5125 | +SQLITE_API void SQLITE_APICALL sqlite3_result_blob(sqlite3_context*, const void*, int, void(SQLITE_CALLBACK *)(void*)); |
| 5126 | +SQLITE_API void SQLITE_APICALL sqlite3_result_blob64(sqlite3_context*,const void*, |
| 5127 | + sqlite3_uint64,void(SQLITE_CALLBACK *)(void*)); |
| 5128 | +SQLITE_API void SQLITE_APICALL sqlite3_result_double(sqlite3_context*, double); |
| 5129 | +SQLITE_API void SQLITE_APICALL sqlite3_result_error(sqlite3_context*, const char*, int); |
| 5130 | +SQLITE_API void SQLITE_APICALL sqlite3_result_error16(sqlite3_context*, const void*, int); |
| 5131 | +SQLITE_API void SQLITE_APICALL sqlite3_result_error_toobig(sqlite3_context*); |
| 5132 | +SQLITE_API void SQLITE_APICALL sqlite3_result_error_nomem(sqlite3_context*); |
| 5133 | +SQLITE_API void SQLITE_APICALL sqlite3_result_error_code(sqlite3_context*, int); |
| 5134 | +SQLITE_API void SQLITE_APICALL sqlite3_result_int(sqlite3_context*, int); |
| 5135 | +SQLITE_API void SQLITE_APICALL sqlite3_result_int64(sqlite3_context*, sqlite3_int64); |
| 5136 | +SQLITE_API void SQLITE_APICALL sqlite3_result_null(sqlite3_context*); |
| 5137 | +SQLITE_API void SQLITE_APICALL sqlite3_result_text(sqlite3_context*, const char*, int, void(SQLITE_CALLBACK *)(void*)); |
| 5138 | +SQLITE_API void SQLITE_APICALL sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64, |
| 5139 | + void(SQLITE_CALLBACK *)(void*), unsigned char encoding); |
| 5140 | +SQLITE_API void SQLITE_APICALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(SQLITE_CALLBACK *)(void*)); |
| 5141 | +SQLITE_API void SQLITE_APICALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(SQLITE_CALLBACK *)(void*)); |
| 5142 | +SQLITE_API void SQLITE_APICALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(SQLITE_CALLBACK *)(void*)); |
| 5143 | +SQLITE_API void SQLITE_APICALL sqlite3_result_value(sqlite3_context*, sqlite3_value*); |
| 5144 | +SQLITE_API void SQLITE_APICALL sqlite3_result_zeroblob(sqlite3_context*, int n); |
| 5145 | +SQLITE_API int SQLITE_APICALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n); |
| 5119 | 5146 | |
| 5120 | 5147 | |
| 5121 | 5148 | /* |
| 5122 | 5149 | ** CAPI3REF: Setting The Subtype Of An SQL Function |
| 5123 | 5150 | ** METHOD: sqlite3_context |
| | @@ -5128,11 +5155,11 @@ |
| 5128 | 5155 | ** of the subtype T are preserved in current versions of SQLite; |
| 5129 | 5156 | ** higher order bits are discarded. |
| 5130 | 5157 | ** The number of subtype bytes preserved by SQLite might increase |
| 5131 | 5158 | ** in future releases of SQLite. |
| 5132 | 5159 | */ |
| 5133 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned int); |
| 5160 | +SQLITE_API void SQLITE_APICALL sqlite3_result_subtype(sqlite3_context*,unsigned int); |
| 5134 | 5161 | |
| 5135 | 5162 | /* |
| 5136 | 5163 | ** CAPI3REF: Define New Collating Sequences |
| 5137 | 5164 | ** METHOD: sqlite3 |
| 5138 | 5165 | ** |
| | @@ -5210,31 +5237,31 @@ |
| 5210 | 5237 | ** is unfortunate but cannot be changed without breaking backwards |
| 5211 | 5238 | ** compatibility. |
| 5212 | 5239 | ** |
| 5213 | 5240 | ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()]. |
| 5214 | 5241 | */ |
| 5215 | | -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation( |
| 5242 | +SQLITE_API int SQLITE_APICALL sqlite3_create_collation( |
| 5216 | 5243 | sqlite3*, |
| 5217 | 5244 | const char *zName, |
| 5218 | 5245 | int eTextRep, |
| 5219 | 5246 | void *pArg, |
| 5220 | | - int(*xCompare)(void*,int,const void*,int,const void*) |
| 5247 | + int(SQLITE_CALLBACK *xCompare)(void*,int,const void*,int,const void*) |
| 5221 | 5248 | ); |
| 5222 | | -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2( |
| 5249 | +SQLITE_API int SQLITE_APICALL sqlite3_create_collation_v2( |
| 5223 | 5250 | sqlite3*, |
| 5224 | 5251 | const char *zName, |
| 5225 | 5252 | int eTextRep, |
| 5226 | 5253 | void *pArg, |
| 5227 | | - int(*xCompare)(void*,int,const void*,int,const void*), |
| 5228 | | - void(*xDestroy)(void*) |
| 5254 | + int(SQLITE_CALLBACK *xCompare)(void*,int,const void*,int,const void*), |
| 5255 | + void(SQLITE_CALLBACK *xDestroy)(void*) |
| 5229 | 5256 | ); |
| 5230 | | -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16( |
| 5257 | +SQLITE_API int SQLITE_APICALL sqlite3_create_collation16( |
| 5231 | 5258 | sqlite3*, |
| 5232 | 5259 | const void *zName, |
| 5233 | 5260 | int eTextRep, |
| 5234 | 5261 | void *pArg, |
| 5235 | | - int(*xCompare)(void*,int,const void*,int,const void*) |
| 5262 | + int(SQLITE_CALLBACK *xCompare)(void*,int,const void*,int,const void*) |
| 5236 | 5263 | ); |
| 5237 | 5264 | |
| 5238 | 5265 | /* |
| 5239 | 5266 | ** CAPI3REF: Collation Needed Callbacks |
| 5240 | 5267 | ** METHOD: sqlite3 |
| | @@ -5260,19 +5287,19 @@ |
| 5260 | 5287 | ** |
| 5261 | 5288 | ** The callback function should register the desired collation using |
| 5262 | 5289 | ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or |
| 5263 | 5290 | ** [sqlite3_create_collation_v2()]. |
| 5264 | 5291 | */ |
| 5265 | | -SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed( |
| 5292 | +SQLITE_API int SQLITE_APICALL sqlite3_collation_needed( |
| 5266 | 5293 | sqlite3*, |
| 5267 | 5294 | void*, |
| 5268 | | - void(*)(void*,sqlite3*,int eTextRep,const char*) |
| 5295 | + void(SQLITE_CALLBACK *)(void*,sqlite3*,int eTextRep,const char*) |
| 5269 | 5296 | ); |
| 5270 | | -SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16( |
| 5297 | +SQLITE_API int SQLITE_APICALL sqlite3_collation_needed16( |
| 5271 | 5298 | sqlite3*, |
| 5272 | 5299 | void*, |
| 5273 | | - void(*)(void*,sqlite3*,int eTextRep,const void*) |
| 5300 | + void(SQLITE_CALLBACK *)(void*,sqlite3*,int eTextRep,const void*) |
| 5274 | 5301 | ); |
| 5275 | 5302 | |
| 5276 | 5303 | #ifdef SQLITE_HAS_CODEC |
| 5277 | 5304 | /* |
| 5278 | 5305 | ** Specify the key for an encrypted database. This routine should be |
| | @@ -5279,15 +5306,15 @@ |
| 5279 | 5306 | ** called right after sqlite3_open(). |
| 5280 | 5307 | ** |
| 5281 | 5308 | ** The code to implement this API is not available in the public release |
| 5282 | 5309 | ** of SQLite. |
| 5283 | 5310 | */ |
| 5284 | | -SQLITE_API int SQLITE_STDCALL sqlite3_key( |
| 5311 | +SQLITE_API int SQLITE_APICALL sqlite3_key( |
| 5285 | 5312 | sqlite3 *db, /* Database to be rekeyed */ |
| 5286 | 5313 | const void *pKey, int nKey /* The key */ |
| 5287 | 5314 | ); |
| 5288 | | -SQLITE_API int SQLITE_STDCALL sqlite3_key_v2( |
| 5315 | +SQLITE_API int SQLITE_APICALL sqlite3_key_v2( |
| 5289 | 5316 | sqlite3 *db, /* Database to be rekeyed */ |
| 5290 | 5317 | const char *zDbName, /* Name of the database */ |
| 5291 | 5318 | const void *pKey, int nKey /* The key */ |
| 5292 | 5319 | ); |
| 5293 | 5320 | |
| | @@ -5297,35 +5324,35 @@ |
| 5297 | 5324 | ** database is decrypted. |
| 5298 | 5325 | ** |
| 5299 | 5326 | ** The code to implement this API is not available in the public release |
| 5300 | 5327 | ** of SQLite. |
| 5301 | 5328 | */ |
| 5302 | | -SQLITE_API int SQLITE_STDCALL sqlite3_rekey( |
| 5329 | +SQLITE_API int SQLITE_APICALL sqlite3_rekey( |
| 5303 | 5330 | sqlite3 *db, /* Database to be rekeyed */ |
| 5304 | 5331 | const void *pKey, int nKey /* The new key */ |
| 5305 | 5332 | ); |
| 5306 | | -SQLITE_API int SQLITE_STDCALL sqlite3_rekey_v2( |
| 5333 | +SQLITE_API int SQLITE_APICALL sqlite3_rekey_v2( |
| 5307 | 5334 | sqlite3 *db, /* Database to be rekeyed */ |
| 5308 | 5335 | const char *zDbName, /* Name of the database */ |
| 5309 | 5336 | const void *pKey, int nKey /* The new key */ |
| 5310 | 5337 | ); |
| 5311 | 5338 | |
| 5312 | 5339 | /* |
| 5313 | 5340 | ** Specify the activation key for a SEE database. Unless |
| 5314 | 5341 | ** activated, none of the SEE routines will work. |
| 5315 | 5342 | */ |
| 5316 | | -SQLITE_API void SQLITE_STDCALL sqlite3_activate_see( |
| 5343 | +SQLITE_API void SQLITE_APICALL sqlite3_activate_see( |
| 5317 | 5344 | const char *zPassPhrase /* Activation phrase */ |
| 5318 | 5345 | ); |
| 5319 | 5346 | #endif |
| 5320 | 5347 | |
| 5321 | 5348 | #ifdef SQLITE_ENABLE_CEROD |
| 5322 | 5349 | /* |
| 5323 | 5350 | ** Specify the activation key for a CEROD database. Unless |
| 5324 | 5351 | ** activated, none of the CEROD routines will work. |
| 5325 | 5352 | */ |
| 5326 | | -SQLITE_API void SQLITE_STDCALL sqlite3_activate_cerod( |
| 5353 | +SQLITE_API void SQLITE_APICALL sqlite3_activate_cerod( |
| 5327 | 5354 | const char *zPassPhrase /* Activation phrase */ |
| 5328 | 5355 | ); |
| 5329 | 5356 | #endif |
| 5330 | 5357 | |
| 5331 | 5358 | /* |
| | @@ -5343,11 +5370,11 @@ |
| 5343 | 5370 | ** method of the default [sqlite3_vfs] object. If the xSleep() method |
| 5344 | 5371 | ** of the default VFS is not implemented correctly, or not implemented at |
| 5345 | 5372 | ** all, then the behavior of sqlite3_sleep() may deviate from the description |
| 5346 | 5373 | ** in the previous paragraphs. |
| 5347 | 5374 | */ |
| 5348 | | -SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int); |
| 5375 | +SQLITE_API int SQLITE_APICALL sqlite3_sleep(int); |
| 5349 | 5376 | |
| 5350 | 5377 | /* |
| 5351 | 5378 | ** CAPI3REF: Name Of The Folder Holding Temporary Files |
| 5352 | 5379 | ** |
| 5353 | 5380 | ** ^(If this global variable is made to point to a string which is |
| | @@ -5462,11 +5489,11 @@ |
| 5462 | 5489 | ** |
| 5463 | 5490 | ** If another thread changes the autocommit status of the database |
| 5464 | 5491 | ** connection while this routine is running, then the return value |
| 5465 | 5492 | ** is undefined. |
| 5466 | 5493 | */ |
| 5467 | | -SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3*); |
| 5494 | +SQLITE_API int SQLITE_APICALL sqlite3_get_autocommit(sqlite3*); |
| 5468 | 5495 | |
| 5469 | 5496 | /* |
| 5470 | 5497 | ** CAPI3REF: Find The Database Handle Of A Prepared Statement |
| 5471 | 5498 | ** METHOD: sqlite3_stmt |
| 5472 | 5499 | ** |
| | @@ -5475,11 +5502,11 @@ |
| 5475 | 5502 | ** returned by sqlite3_db_handle is the same [database connection] |
| 5476 | 5503 | ** that was the first argument |
| 5477 | 5504 | ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to |
| 5478 | 5505 | ** create the statement in the first place. |
| 5479 | 5506 | */ |
| 5480 | | -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt*); |
| 5507 | +SQLITE_API sqlite3 *SQLITE_APICALL sqlite3_db_handle(sqlite3_stmt*); |
| 5481 | 5508 | |
| 5482 | 5509 | /* |
| 5483 | 5510 | ** CAPI3REF: Return The Filename For A Database Connection |
| 5484 | 5511 | ** METHOD: sqlite3 |
| 5485 | 5512 | ** |
| | @@ -5492,21 +5519,21 @@ |
| 5492 | 5519 | ** ^The filename returned by this function is the output of the |
| 5493 | 5520 | ** xFullPathname method of the [VFS]. ^In other words, the filename |
| 5494 | 5521 | ** will be an absolute pathname, even if the filename used |
| 5495 | 5522 | ** to open the database originally was a URI or relative pathname. |
| 5496 | 5523 | */ |
| 5497 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName); |
| 5524 | +SQLITE_API const char *SQLITE_APICALL sqlite3_db_filename(sqlite3 *db, const char *zDbName); |
| 5498 | 5525 | |
| 5499 | 5526 | /* |
| 5500 | 5527 | ** CAPI3REF: Determine if a database is read-only |
| 5501 | 5528 | ** METHOD: sqlite3 |
| 5502 | 5529 | ** |
| 5503 | 5530 | ** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N |
| 5504 | 5531 | ** of connection D is read-only, 0 if it is read/write, or -1 if N is not |
| 5505 | 5532 | ** the name of a database on connection D. |
| 5506 | 5533 | */ |
| 5507 | | -SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName); |
| 5534 | +SQLITE_API int SQLITE_APICALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName); |
| 5508 | 5535 | |
| 5509 | 5536 | /* |
| 5510 | 5537 | ** CAPI3REF: Find the next prepared statement |
| 5511 | 5538 | ** METHOD: sqlite3 |
| 5512 | 5539 | ** |
| | @@ -5518,11 +5545,11 @@ |
| 5518 | 5545 | ** |
| 5519 | 5546 | ** The [database connection] pointer D in a call to |
| 5520 | 5547 | ** [sqlite3_next_stmt(D,S)] must refer to an open database |
| 5521 | 5548 | ** connection and in particular must not be a NULL pointer. |
| 5522 | 5549 | */ |
| 5523 | | -SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); |
| 5550 | +SQLITE_API sqlite3_stmt *SQLITE_APICALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); |
| 5524 | 5551 | |
| 5525 | 5552 | /* |
| 5526 | 5553 | ** CAPI3REF: Commit And Rollback Notification Callbacks |
| 5527 | 5554 | ** METHOD: sqlite3 |
| 5528 | 5555 | ** |
| | @@ -5567,12 +5594,12 @@ |
| 5567 | 5594 | ** ^The rollback callback is not invoked if a transaction is |
| 5568 | 5595 | ** automatically rolled back because the database connection is closed. |
| 5569 | 5596 | ** |
| 5570 | 5597 | ** See also the [sqlite3_update_hook()] interface. |
| 5571 | 5598 | */ |
| 5572 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); |
| 5573 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); |
| 5599 | +SQLITE_API void *SQLITE_APICALL sqlite3_commit_hook(sqlite3*, int(SQLITE_CALLBACK *)(void*), void*); |
| 5600 | +SQLITE_API void *SQLITE_APICALL sqlite3_rollback_hook(sqlite3*, void(SQLITE_CALLBACK *)(void *), void*); |
| 5574 | 5601 | |
| 5575 | 5602 | /* |
| 5576 | 5603 | ** CAPI3REF: Data Change Notification Callbacks |
| 5577 | 5604 | ** METHOD: sqlite3 |
| 5578 | 5605 | ** |
| | @@ -5619,13 +5646,13 @@ |
| 5619 | 5646 | ** the first call on D. |
| 5620 | 5647 | ** |
| 5621 | 5648 | ** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()], |
| 5622 | 5649 | ** and [sqlite3_preupdate_hook()] interfaces. |
| 5623 | 5650 | */ |
| 5624 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook( |
| 5651 | +SQLITE_API void *SQLITE_APICALL sqlite3_update_hook( |
| 5625 | 5652 | sqlite3*, |
| 5626 | | - void(*)(void *,int ,char const *,char const *,sqlite3_int64), |
| 5653 | + void(SQLITE_CALLBACK *)(void *,int ,char const *,char const *,sqlite3_int64), |
| 5627 | 5654 | void* |
| 5628 | 5655 | ); |
| 5629 | 5656 | |
| 5630 | 5657 | /* |
| 5631 | 5658 | ** CAPI3REF: Enable Or Disable Shared Pager Cache |
| | @@ -5659,11 +5686,11 @@ |
| 5659 | 5686 | ** This interface is threadsafe on processors where writing a |
| 5660 | 5687 | ** 32-bit integer is atomic. |
| 5661 | 5688 | ** |
| 5662 | 5689 | ** See Also: [SQLite Shared-Cache Mode] |
| 5663 | 5690 | */ |
| 5664 | | -SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int); |
| 5691 | +SQLITE_API int SQLITE_APICALL sqlite3_enable_shared_cache(int); |
| 5665 | 5692 | |
| 5666 | 5693 | /* |
| 5667 | 5694 | ** CAPI3REF: Attempt To Free Heap Memory |
| 5668 | 5695 | ** |
| 5669 | 5696 | ** ^The sqlite3_release_memory() interface attempts to free N bytes |
| | @@ -5675,11 +5702,11 @@ |
| 5675 | 5702 | ** ^The sqlite3_release_memory() routine is a no-op returning zero |
| 5676 | 5703 | ** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT]. |
| 5677 | 5704 | ** |
| 5678 | 5705 | ** See also: [sqlite3_db_release_memory()] |
| 5679 | 5706 | */ |
| 5680 | | -SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int); |
| 5707 | +SQLITE_API int SQLITE_APICALL sqlite3_release_memory(int); |
| 5681 | 5708 | |
| 5682 | 5709 | /* |
| 5683 | 5710 | ** CAPI3REF: Free Memory Used By A Database Connection |
| 5684 | 5711 | ** METHOD: sqlite3 |
| 5685 | 5712 | ** |
| | @@ -5689,11 +5716,11 @@ |
| 5689 | 5716 | ** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is |
| 5690 | 5717 | ** omitted. |
| 5691 | 5718 | ** |
| 5692 | 5719 | ** See also: [sqlite3_release_memory()] |
| 5693 | 5720 | */ |
| 5694 | | -SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*); |
| 5721 | +SQLITE_API int SQLITE_APICALL sqlite3_db_release_memory(sqlite3*); |
| 5695 | 5722 | |
| 5696 | 5723 | /* |
| 5697 | 5724 | ** CAPI3REF: Impose A Limit On Heap Size |
| 5698 | 5725 | ** |
| 5699 | 5726 | ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the |
| | @@ -5741,11 +5768,11 @@ |
| 5741 | 5768 | ** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT]. |
| 5742 | 5769 | ** |
| 5743 | 5770 | ** The circumstances under which SQLite will enforce the soft heap limit may |
| 5744 | 5771 | ** changes in future releases of SQLite. |
| 5745 | 5772 | */ |
| 5746 | | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 N); |
| 5773 | +SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_soft_heap_limit64(sqlite3_int64 N); |
| 5747 | 5774 | |
| 5748 | 5775 | /* |
| 5749 | 5776 | ** CAPI3REF: Deprecated Soft Heap Limit Interface |
| 5750 | 5777 | ** DEPRECATED |
| 5751 | 5778 | ** |
| | @@ -5752,11 +5779,11 @@ |
| 5752 | 5779 | ** This is a deprecated version of the [sqlite3_soft_heap_limit64()] |
| 5753 | 5780 | ** interface. This routine is provided for historical compatibility |
| 5754 | 5781 | ** only. All new applications should use the |
| 5755 | 5782 | ** [sqlite3_soft_heap_limit64()] interface rather than this one. |
| 5756 | 5783 | */ |
| 5757 | | -SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_soft_heap_limit(int N); |
| 5784 | +SQLITE_API SQLITE_DEPRECATED void SQLITE_APICALL sqlite3_soft_heap_limit(int N); |
| 5758 | 5785 | |
| 5759 | 5786 | |
| 5760 | 5787 | /* |
| 5761 | 5788 | ** CAPI3REF: Extract Metadata About A Column Of A Table |
| 5762 | 5789 | ** METHOD: sqlite3 |
| | @@ -5822,11 +5849,11 @@ |
| 5822 | 5849 | ** |
| 5823 | 5850 | ** ^This function causes all database schemas to be read from disk and |
| 5824 | 5851 | ** parsed, if that has not already been done, and returns an error if |
| 5825 | 5852 | ** any errors are encountered while loading the schema. |
| 5826 | 5853 | */ |
| 5827 | | -SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata( |
| 5854 | +SQLITE_API int SQLITE_APICALL sqlite3_table_column_metadata( |
| 5828 | 5855 | sqlite3 *db, /* Connection handle */ |
| 5829 | 5856 | const char *zDbName, /* Database name or NULL */ |
| 5830 | 5857 | const char *zTableName, /* Table name */ |
| 5831 | 5858 | const char *zColumnName, /* Column name */ |
| 5832 | 5859 | char const **pzDataType, /* OUTPUT: Declared data type */ |
| | @@ -5878,11 +5905,11 @@ |
| 5878 | 5905 | ** disabled and prevent SQL injections from giving attackers |
| 5879 | 5906 | ** access to extension loading capabilities. |
| 5880 | 5907 | ** |
| 5881 | 5908 | ** See also the [load_extension() SQL function]. |
| 5882 | 5909 | */ |
| 5883 | | -SQLITE_API int SQLITE_STDCALL sqlite3_load_extension( |
| 5910 | +SQLITE_API int SQLITE_APICALL sqlite3_load_extension( |
| 5884 | 5911 | sqlite3 *db, /* Load the extension into this database connection */ |
| 5885 | 5912 | const char *zFile, /* Name of the shared library containing extension */ |
| 5886 | 5913 | const char *zProc, /* Entry point. Derived from zFile if 0 */ |
| 5887 | 5914 | char **pzErrMsg /* Put error message here if not 0 */ |
| 5888 | 5915 | ); |
| | @@ -5910,11 +5937,11 @@ |
| 5910 | 5937 | ** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method |
| 5911 | 5938 | ** rather than this interface, so the [load_extension()] SQL function |
| 5912 | 5939 | ** remains disabled. This will prevent SQL injections from giving attackers |
| 5913 | 5940 | ** access to extension loading capabilities. |
| 5914 | 5941 | */ |
| 5915 | | -SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff); |
| 5942 | +SQLITE_API int SQLITE_APICALL sqlite3_enable_load_extension(sqlite3 *db, int onoff); |
| 5916 | 5943 | |
| 5917 | 5944 | /* |
| 5918 | 5945 | ** CAPI3REF: Automatically Load Statically Linked Extensions |
| 5919 | 5946 | ** |
| 5920 | 5947 | ** ^This interface causes the xEntryPoint() function to be invoked for |
| | @@ -5922,11 +5949,11 @@ |
| 5922 | 5949 | ** xEntryPoint() is the entry point for a statically linked [SQLite extension] |
| 5923 | 5950 | ** that is to be automatically loaded into all new database connections. |
| 5924 | 5951 | ** |
| 5925 | 5952 | ** ^(Even though the function prototype shows that xEntryPoint() takes |
| 5926 | 5953 | ** no arguments and returns void, SQLite invokes xEntryPoint() with three |
| 5927 | | -** arguments and expects and integer result as if the signature of the |
| 5954 | +** arguments and expects an integer result as if the signature of the |
| 5928 | 5955 | ** entry point where as follows: |
| 5929 | 5956 | ** |
| 5930 | 5957 | ** <blockquote><pre> |
| 5931 | 5958 | ** int xEntryPoint( |
| 5932 | 5959 | ** sqlite3 *db, |
| | @@ -5948,11 +5975,11 @@ |
| 5948 | 5975 | ** will be called more than once for each database connection that is opened. |
| 5949 | 5976 | ** |
| 5950 | 5977 | ** See also: [sqlite3_reset_auto_extension()] |
| 5951 | 5978 | ** and [sqlite3_cancel_auto_extension()] |
| 5952 | 5979 | */ |
| 5953 | | -SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void (*xEntryPoint)(void)); |
| 5980 | +SQLITE_API int SQLITE_APICALL sqlite3_auto_extension(void(SQLITE_CALLBACK *xEntryPoint)(void)); |
| 5954 | 5981 | |
| 5955 | 5982 | /* |
| 5956 | 5983 | ** CAPI3REF: Cancel Automatic Extension Loading |
| 5957 | 5984 | ** |
| 5958 | 5985 | ** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the |
| | @@ -5960,19 +5987,19 @@ |
| 5960 | 5987 | ** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)] |
| 5961 | 5988 | ** routine returns 1 if initialization routine X was successfully |
| 5962 | 5989 | ** unregistered and it returns 0 if X was not on the list of initialization |
| 5963 | 5990 | ** routines. |
| 5964 | 5991 | */ |
| 5965 | | -SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void (*xEntryPoint)(void)); |
| 5992 | +SQLITE_API int SQLITE_APICALL sqlite3_cancel_auto_extension(void(SQLITE_CALLBACK *xEntryPoint)(void)); |
| 5966 | 5993 | |
| 5967 | 5994 | /* |
| 5968 | 5995 | ** CAPI3REF: Reset Automatic Extension Loading |
| 5969 | 5996 | ** |
| 5970 | 5997 | ** ^This interface disables all automatic extensions previously |
| 5971 | 5998 | ** registered using [sqlite3_auto_extension()]. |
| 5972 | 5999 | */ |
| 5973 | | -SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void); |
| 6000 | +SQLITE_API void SQLITE_APICALL sqlite3_reset_auto_extension(void); |
| 5974 | 6001 | |
| 5975 | 6002 | /* |
| 5976 | 6003 | ** The interface to the virtual-table mechanism is currently considered |
| 5977 | 6004 | ** to be experimental. The interface might change in incompatible ways. |
| 5978 | 6005 | ** If this is a problem for you, do not use the interface at this time. |
| | @@ -6005,41 +6032,41 @@ |
| 6005 | 6032 | ** of this structure must not change while it is registered with |
| 6006 | 6033 | ** any database connection. |
| 6007 | 6034 | */ |
| 6008 | 6035 | struct sqlite3_module { |
| 6009 | 6036 | int iVersion; |
| 6010 | | - int (*xCreate)(sqlite3*, void *pAux, |
| 6011 | | - int argc, const char *const*argv, |
| 6012 | | - sqlite3_vtab **ppVTab, char**); |
| 6013 | | - int (*xConnect)(sqlite3*, void *pAux, |
| 6014 | | - int argc, const char *const*argv, |
| 6015 | | - sqlite3_vtab **ppVTab, char**); |
| 6016 | | - int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*); |
| 6017 | | - int (*xDisconnect)(sqlite3_vtab *pVTab); |
| 6018 | | - int (*xDestroy)(sqlite3_vtab *pVTab); |
| 6019 | | - int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor); |
| 6020 | | - int (*xClose)(sqlite3_vtab_cursor*); |
| 6021 | | - int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr, |
| 6022 | | - int argc, sqlite3_value **argv); |
| 6023 | | - int (*xNext)(sqlite3_vtab_cursor*); |
| 6024 | | - int (*xEof)(sqlite3_vtab_cursor*); |
| 6025 | | - int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int); |
| 6026 | | - int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid); |
| 6027 | | - int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *); |
| 6028 | | - int (*xBegin)(sqlite3_vtab *pVTab); |
| 6029 | | - int (*xSync)(sqlite3_vtab *pVTab); |
| 6030 | | - int (*xCommit)(sqlite3_vtab *pVTab); |
| 6031 | | - int (*xRollback)(sqlite3_vtab *pVTab); |
| 6032 | | - int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName, |
| 6033 | | - void (**pxFunc)(sqlite3_context*,int,sqlite3_value**), |
| 6034 | | - void **ppArg); |
| 6035 | | - int (*xRename)(sqlite3_vtab *pVtab, const char *zNew); |
| 6036 | | - /* The methods above are in version 1 of the sqlite_module object. Those |
| 6037 | | - ** below are for version 2 and greater. */ |
| 6038 | | - int (*xSavepoint)(sqlite3_vtab *pVTab, int); |
| 6039 | | - int (*xRelease)(sqlite3_vtab *pVTab, int); |
| 6040 | | - int (*xRollbackTo)(sqlite3_vtab *pVTab, int); |
| 6037 | + int (SQLITE_CALLBACK *xCreate)(sqlite3*, void *pAux, |
| 6038 | + int argc, const char *const*argv, |
| 6039 | + sqlite3_vtab **ppVTab, char**); |
| 6040 | + int (SQLITE_CALLBACK *xConnect)(sqlite3*, void *pAux, |
| 6041 | + int argc, const char *const*argv, |
| 6042 | + sqlite3_vtab **ppVTab, char**); |
| 6043 | + int (SQLITE_CALLBACK *xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*); |
| 6044 | + int (SQLITE_CALLBACK *xDisconnect)(sqlite3_vtab *pVTab); |
| 6045 | + int (SQLITE_CALLBACK *xDestroy)(sqlite3_vtab *pVTab); |
| 6046 | + int (SQLITE_CALLBACK *xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor); |
| 6047 | + int (SQLITE_CALLBACK *xClose)(sqlite3_vtab_cursor*); |
| 6048 | + int (SQLITE_CALLBACK *xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr, |
| 6049 | + int argc, sqlite3_value **argv); |
| 6050 | + int (SQLITE_CALLBACK *xNext)(sqlite3_vtab_cursor*); |
| 6051 | + int (SQLITE_CALLBACK *xEof)(sqlite3_vtab_cursor*); |
| 6052 | + int (SQLITE_CALLBACK *xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int); |
| 6053 | + int (SQLITE_CALLBACK *xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid); |
| 6054 | + int (SQLITE_CALLBACK *xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *); |
| 6055 | + int (SQLITE_CALLBACK *xBegin)(sqlite3_vtab *pVTab); |
| 6056 | + int (SQLITE_CALLBACK *xSync)(sqlite3_vtab *pVTab); |
| 6057 | + int (SQLITE_CALLBACK *xCommit)(sqlite3_vtab *pVTab); |
| 6058 | + int (SQLITE_CALLBACK *xRollback)(sqlite3_vtab *pVTab); |
| 6059 | + int (SQLITE_CALLBACK *xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName, |
| 6060 | + void (SQLITE_CALLBACK **pxFunc)(sqlite3_context*,int,sqlite3_value**), |
| 6061 | + void **ppArg); |
| 6062 | + int (SQLITE_CALLBACK *xRename)(sqlite3_vtab *pVtab, const char *zNew); |
| 6063 | + /* The methods above are in version 1 of the sqlite_module object. Those |
| 6064 | + ** below are for version 2 and greater. */ |
| 6065 | + int (SQLITE_CALLBACK *xSavepoint)(sqlite3_vtab *pVTab, int); |
| 6066 | + int (SQLITE_CALLBACK *xRelease)(sqlite3_vtab *pVTab, int); |
| 6067 | + int (SQLITE_CALLBACK *xRollbackTo)(sqlite3_vtab *pVTab, int); |
| 6041 | 6068 | }; |
| 6042 | 6069 | |
| 6043 | 6070 | /* |
| 6044 | 6071 | ** CAPI3REF: Virtual Table Indexing Information |
| 6045 | 6072 | ** KEYWORDS: sqlite3_index_info |
| | @@ -6213,22 +6240,22 @@ |
| 6213 | 6240 | ** be invoked if the call to sqlite3_create_module_v2() fails. |
| 6214 | 6241 | ** ^The sqlite3_create_module() |
| 6215 | 6242 | ** interface is equivalent to sqlite3_create_module_v2() with a NULL |
| 6216 | 6243 | ** destructor. |
| 6217 | 6244 | */ |
| 6218 | | -SQLITE_API int SQLITE_STDCALL sqlite3_create_module( |
| 6245 | +SQLITE_API int SQLITE_APICALL sqlite3_create_module( |
| 6219 | 6246 | sqlite3 *db, /* SQLite connection to register module with */ |
| 6220 | 6247 | const char *zName, /* Name of the module */ |
| 6221 | 6248 | const sqlite3_module *p, /* Methods for the module */ |
| 6222 | 6249 | void *pClientData /* Client data for xCreate/xConnect */ |
| 6223 | 6250 | ); |
| 6224 | | -SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2( |
| 6251 | +SQLITE_API int SQLITE_APICALL sqlite3_create_module_v2( |
| 6225 | 6252 | sqlite3 *db, /* SQLite connection to register module with */ |
| 6226 | 6253 | const char *zName, /* Name of the module */ |
| 6227 | 6254 | const sqlite3_module *p, /* Methods for the module */ |
| 6228 | 6255 | void *pClientData, /* Client data for xCreate/xConnect */ |
| 6229 | | - void(*xDestroy)(void*) /* Module destructor function */ |
| 6256 | + void(SQLITE_CALLBACK *xDestroy)(void*) /* Module destructor function */ |
| 6230 | 6257 | ); |
| 6231 | 6258 | |
| 6232 | 6259 | /* |
| 6233 | 6260 | ** CAPI3REF: Virtual Table Instance Object |
| 6234 | 6261 | ** KEYWORDS: sqlite3_vtab |
| | @@ -6282,11 +6309,11 @@ |
| 6282 | 6309 | ** ^The [xCreate] and [xConnect] methods of a |
| 6283 | 6310 | ** [virtual table module] call this interface |
| 6284 | 6311 | ** to declare the format (the names and datatypes of the columns) of |
| 6285 | 6312 | ** the virtual tables they implement. |
| 6286 | 6313 | */ |
| 6287 | | -SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3*, const char *zSQL); |
| 6314 | +SQLITE_API int SQLITE_APICALL sqlite3_declare_vtab(sqlite3*, const char *zSQL); |
| 6288 | 6315 | |
| 6289 | 6316 | /* |
| 6290 | 6317 | ** CAPI3REF: Overload A Function For A Virtual Table |
| 6291 | 6318 | ** METHOD: sqlite3 |
| 6292 | 6319 | ** |
| | @@ -6301,11 +6328,11 @@ |
| 6301 | 6328 | ** of the new function always causes an exception to be thrown. So |
| 6302 | 6329 | ** the new function is not good for anything by itself. Its only |
| 6303 | 6330 | ** purpose is to be a placeholder function that can be overloaded |
| 6304 | 6331 | ** by a [virtual table]. |
| 6305 | 6332 | */ |
| 6306 | | -SQLITE_API int SQLITE_STDCALL sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg); |
| 6333 | +SQLITE_API int SQLITE_APICALL sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg); |
| 6307 | 6334 | |
| 6308 | 6335 | /* |
| 6309 | 6336 | ** The interface to the virtual-table mechanism defined above (back up |
| 6310 | 6337 | ** to a comment remarkably similar to this one) is currently considered |
| 6311 | 6338 | ** to be experimental. The interface might change in incompatible ways. |
| | @@ -6400,11 +6427,11 @@ |
| 6400 | 6427 | ** zero-filled blob to read or write using the incremental-blob interface. |
| 6401 | 6428 | ** |
| 6402 | 6429 | ** To avoid a resource leak, every open [BLOB handle] should eventually |
| 6403 | 6430 | ** be released by a call to [sqlite3_blob_close()]. |
| 6404 | 6431 | */ |
| 6405 | | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_open( |
| 6432 | +SQLITE_API int SQLITE_APICALL sqlite3_blob_open( |
| 6406 | 6433 | sqlite3*, |
| 6407 | 6434 | const char *zDb, |
| 6408 | 6435 | const char *zTable, |
| 6409 | 6436 | const char *zColumn, |
| 6410 | 6437 | sqlite3_int64 iRow, |
| | @@ -6433,11 +6460,11 @@ |
| 6433 | 6460 | ** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle |
| 6434 | 6461 | ** always returns zero. |
| 6435 | 6462 | ** |
| 6436 | 6463 | ** ^This function sets the database handle error code and message. |
| 6437 | 6464 | */ |
| 6438 | | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); |
| 6465 | +SQLITE_API int SQLITE_APICALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); |
| 6439 | 6466 | |
| 6440 | 6467 | /* |
| 6441 | 6468 | ** CAPI3REF: Close A BLOB Handle |
| 6442 | 6469 | ** DESTRUCTOR: sqlite3_blob |
| 6443 | 6470 | ** |
| | @@ -6456,11 +6483,11 @@ |
| 6456 | 6483 | ** with a null pointer (such as would be returned by a failed call to |
| 6457 | 6484 | ** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function |
| 6458 | 6485 | ** is passed a valid open blob handle, the values returned by the |
| 6459 | 6486 | ** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning. |
| 6460 | 6487 | */ |
| 6461 | | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *); |
| 6488 | +SQLITE_API int SQLITE_APICALL sqlite3_blob_close(sqlite3_blob *); |
| 6462 | 6489 | |
| 6463 | 6490 | /* |
| 6464 | 6491 | ** CAPI3REF: Return The Size Of An Open BLOB |
| 6465 | 6492 | ** METHOD: sqlite3_blob |
| 6466 | 6493 | ** |
| | @@ -6472,11 +6499,11 @@ |
| 6472 | 6499 | ** This routine only works on a [BLOB handle] which has been created |
| 6473 | 6500 | ** by a prior successful call to [sqlite3_blob_open()] and which has not |
| 6474 | 6501 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6475 | 6502 | ** to this routine results in undefined and probably undesirable behavior. |
| 6476 | 6503 | */ |
| 6477 | | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *); |
| 6504 | +SQLITE_API int SQLITE_APICALL sqlite3_blob_bytes(sqlite3_blob *); |
| 6478 | 6505 | |
| 6479 | 6506 | /* |
| 6480 | 6507 | ** CAPI3REF: Read Data From A BLOB Incrementally |
| 6481 | 6508 | ** METHOD: sqlite3_blob |
| 6482 | 6509 | ** |
| | @@ -6501,11 +6528,11 @@ |
| 6501 | 6528 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6502 | 6529 | ** to this routine results in undefined and probably undesirable behavior. |
| 6503 | 6530 | ** |
| 6504 | 6531 | ** See also: [sqlite3_blob_write()]. |
| 6505 | 6532 | */ |
| 6506 | | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset); |
| 6533 | +SQLITE_API int SQLITE_APICALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset); |
| 6507 | 6534 | |
| 6508 | 6535 | /* |
| 6509 | 6536 | ** CAPI3REF: Write Data Into A BLOB Incrementally |
| 6510 | 6537 | ** METHOD: sqlite3_blob |
| 6511 | 6538 | ** |
| | @@ -6543,11 +6570,11 @@ |
| 6543 | 6570 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6544 | 6571 | ** to this routine results in undefined and probably undesirable behavior. |
| 6545 | 6572 | ** |
| 6546 | 6573 | ** See also: [sqlite3_blob_read()]. |
| 6547 | 6574 | */ |
| 6548 | | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); |
| 6575 | +SQLITE_API int SQLITE_APICALL sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); |
| 6549 | 6576 | |
| 6550 | 6577 | /* |
| 6551 | 6578 | ** CAPI3REF: Virtual File System Objects |
| 6552 | 6579 | ** |
| 6553 | 6580 | ** A virtual filesystem (VFS) is an [sqlite3_vfs] object |
| | @@ -6574,13 +6601,13 @@ |
| 6574 | 6601 | ** |
| 6575 | 6602 | ** ^Unregister a VFS with the sqlite3_vfs_unregister() interface. |
| 6576 | 6603 | ** ^(If the default VFS is unregistered, another VFS is chosen as |
| 6577 | 6604 | ** the default. The choice for the new VFS is arbitrary.)^ |
| 6578 | 6605 | */ |
| 6579 | | -SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfsName); |
| 6580 | | -SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs*, int makeDflt); |
| 6581 | | -SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs*); |
| 6606 | +SQLITE_API sqlite3_vfs *SQLITE_APICALL sqlite3_vfs_find(const char *zVfsName); |
| 6607 | +SQLITE_API int SQLITE_APICALL sqlite3_vfs_register(sqlite3_vfs*, int makeDflt); |
| 6608 | +SQLITE_API int SQLITE_APICALL sqlite3_vfs_unregister(sqlite3_vfs*); |
| 6582 | 6609 | |
| 6583 | 6610 | /* |
| 6584 | 6611 | ** CAPI3REF: Mutexes |
| 6585 | 6612 | ** |
| 6586 | 6613 | ** The SQLite core uses these routines for thread |
| | @@ -6692,15 +6719,15 @@ |
| 6692 | 6719 | ** sqlite3_mutex_leave() is a NULL pointer, then all three routines |
| 6693 | 6720 | ** behave as no-ops. |
| 6694 | 6721 | ** |
| 6695 | 6722 | ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. |
| 6696 | 6723 | */ |
| 6697 | | -SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int); |
| 6698 | | -SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex*); |
| 6699 | | -SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex*); |
| 6700 | | -SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex*); |
| 6701 | | -SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex*); |
| 6724 | +SQLITE_API sqlite3_mutex *SQLITE_APICALL sqlite3_mutex_alloc(int); |
| 6725 | +SQLITE_API void SQLITE_APICALL sqlite3_mutex_free(sqlite3_mutex*); |
| 6726 | +SQLITE_API void SQLITE_APICALL sqlite3_mutex_enter(sqlite3_mutex*); |
| 6727 | +SQLITE_API int SQLITE_APICALL sqlite3_mutex_try(sqlite3_mutex*); |
| 6728 | +SQLITE_API void SQLITE_APICALL sqlite3_mutex_leave(sqlite3_mutex*); |
| 6702 | 6729 | |
| 6703 | 6730 | /* |
| 6704 | 6731 | ** CAPI3REF: Mutex Methods Object |
| 6705 | 6732 | ** |
| 6706 | 6733 | ** An instance of this structure defines the low-level routines |
| | @@ -6765,19 +6792,19 @@ |
| 6765 | 6792 | ** If xMutexInit fails in any way, it is expected to clean up after itself |
| 6766 | 6793 | ** prior to returning. |
| 6767 | 6794 | */ |
| 6768 | 6795 | typedef struct sqlite3_mutex_methods sqlite3_mutex_methods; |
| 6769 | 6796 | struct sqlite3_mutex_methods { |
| 6770 | | - int (*xMutexInit)(void); |
| 6771 | | - int (*xMutexEnd)(void); |
| 6772 | | - sqlite3_mutex *(*xMutexAlloc)(int); |
| 6773 | | - void (*xMutexFree)(sqlite3_mutex *); |
| 6774 | | - void (*xMutexEnter)(sqlite3_mutex *); |
| 6775 | | - int (*xMutexTry)(sqlite3_mutex *); |
| 6776 | | - void (*xMutexLeave)(sqlite3_mutex *); |
| 6777 | | - int (*xMutexHeld)(sqlite3_mutex *); |
| 6778 | | - int (*xMutexNotheld)(sqlite3_mutex *); |
| 6797 | + int (SQLITE_CALLBACK *xMutexInit)(void); |
| 6798 | + int (SQLITE_CALLBACK *xMutexEnd)(void); |
| 6799 | + sqlite3_mutex *(SQLITE_CALLBACK *xMutexAlloc)(int); |
| 6800 | + void (SQLITE_CALLBACK *xMutexFree)(sqlite3_mutex *); |
| 6801 | + void (SQLITE_CALLBACK *xMutexEnter)(sqlite3_mutex *); |
| 6802 | + int (SQLITE_CALLBACK *xMutexTry)(sqlite3_mutex *); |
| 6803 | + void (SQLITE_CALLBACK *xMutexLeave)(sqlite3_mutex *); |
| 6804 | + int (SQLITE_CALLBACK *xMutexHeld)(sqlite3_mutex *); |
| 6805 | + int (SQLITE_CALLBACK *xMutexNotheld)(sqlite3_mutex *); |
| 6779 | 6806 | }; |
| 6780 | 6807 | |
| 6781 | 6808 | /* |
| 6782 | 6809 | ** CAPI3REF: Mutex Verification Routines |
| 6783 | 6810 | ** |
| | @@ -6806,12 +6833,12 @@ |
| 6806 | 6833 | ** call to sqlite3_mutex_held() to fail, so a non-zero return is |
| 6807 | 6834 | ** the appropriate thing to do. The sqlite3_mutex_notheld() |
| 6808 | 6835 | ** interface should also return 1 when given a NULL pointer. |
| 6809 | 6836 | */ |
| 6810 | 6837 | #ifndef NDEBUG |
| 6811 | | -SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex*); |
| 6812 | | -SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex*); |
| 6838 | +SQLITE_API int SQLITE_APICALL sqlite3_mutex_held(sqlite3_mutex*); |
| 6839 | +SQLITE_API int SQLITE_APICALL sqlite3_mutex_notheld(sqlite3_mutex*); |
| 6813 | 6840 | #endif |
| 6814 | 6841 | |
| 6815 | 6842 | /* |
| 6816 | 6843 | ** CAPI3REF: Mutex Types |
| 6817 | 6844 | ** |
| | @@ -6847,11 +6874,11 @@ |
| 6847 | 6874 | ** serializes access to the [database connection] given in the argument |
| 6848 | 6875 | ** when the [threading mode] is Serialized. |
| 6849 | 6876 | ** ^If the [threading mode] is Single-thread or Multi-thread then this |
| 6850 | 6877 | ** routine returns a NULL pointer. |
| 6851 | 6878 | */ |
| 6852 | | -SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3*); |
| 6879 | +SQLITE_API sqlite3_mutex *SQLITE_APICALL sqlite3_db_mutex(sqlite3*); |
| 6853 | 6880 | |
| 6854 | 6881 | /* |
| 6855 | 6882 | ** CAPI3REF: Low-Level Control Of Database Files |
| 6856 | 6883 | ** METHOD: sqlite3 |
| 6857 | 6884 | ** |
| | @@ -6882,11 +6909,11 @@ |
| 6882 | 6909 | ** an incorrect zDbName and an SQLITE_ERROR return from the underlying |
| 6883 | 6910 | ** xFileControl method. |
| 6884 | 6911 | ** |
| 6885 | 6912 | ** See also: [SQLITE_FCNTL_LOCKSTATE] |
| 6886 | 6913 | */ |
| 6887 | | -SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*); |
| 6914 | +SQLITE_API int SQLITE_APICALL sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*); |
| 6888 | 6915 | |
| 6889 | 6916 | /* |
| 6890 | 6917 | ** CAPI3REF: Testing Interface |
| 6891 | 6918 | ** |
| 6892 | 6919 | ** ^The sqlite3_test_control() interface is used to read out internal |
| | @@ -6964,12 +6991,12 @@ |
| 6964 | 6991 | ** be represented by a 32-bit integer, then the values returned by |
| 6965 | 6992 | ** sqlite3_status() are undefined. |
| 6966 | 6993 | ** |
| 6967 | 6994 | ** See also: [sqlite3_db_status()] |
| 6968 | 6995 | */ |
| 6969 | | -SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag); |
| 6970 | | -SQLITE_API int SQLITE_STDCALL sqlite3_status64( |
| 6996 | +SQLITE_API int SQLITE_APICALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag); |
| 6997 | +SQLITE_API int SQLITE_APICALL sqlite3_status64( |
| 6971 | 6998 | int op, |
| 6972 | 6999 | sqlite3_int64 *pCurrent, |
| 6973 | 7000 | sqlite3_int64 *pHighwater, |
| 6974 | 7001 | int resetFlag |
| 6975 | 7002 | ); |
| | @@ -7090,11 +7117,11 @@ |
| 7090 | 7117 | ** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a |
| 7091 | 7118 | ** non-zero [error code] on failure. |
| 7092 | 7119 | ** |
| 7093 | 7120 | ** See also: [sqlite3_status()] and [sqlite3_stmt_status()]. |
| 7094 | 7121 | */ |
| 7095 | | -SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg); |
| 7122 | +SQLITE_API int SQLITE_APICALL sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg); |
| 7096 | 7123 | |
| 7097 | 7124 | /* |
| 7098 | 7125 | ** CAPI3REF: Status Parameters for database connections |
| 7099 | 7126 | ** KEYWORDS: {SQLITE_DBSTATUS options} |
| 7100 | 7127 | ** |
| | @@ -7233,11 +7260,11 @@ |
| 7233 | 7260 | ** ^If the resetFlg is true, then the counter is reset to zero after this |
| 7234 | 7261 | ** interface call returns. |
| 7235 | 7262 | ** |
| 7236 | 7263 | ** See also: [sqlite3_status()] and [sqlite3_db_status()]. |
| 7237 | 7264 | */ |
| 7238 | | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg); |
| 7265 | +SQLITE_API int SQLITE_APICALL sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg); |
| 7239 | 7266 | |
| 7240 | 7267 | /* |
| 7241 | 7268 | ** CAPI3REF: Status Parameters for prepared statements |
| 7242 | 7269 | ** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters} |
| 7243 | 7270 | ** |
| | @@ -7469,22 +7496,22 @@ |
| 7469 | 7496 | */ |
| 7470 | 7497 | typedef struct sqlite3_pcache_methods2 sqlite3_pcache_methods2; |
| 7471 | 7498 | struct sqlite3_pcache_methods2 { |
| 7472 | 7499 | int iVersion; |
| 7473 | 7500 | void *pArg; |
| 7474 | | - int (*xInit)(void*); |
| 7475 | | - void (*xShutdown)(void*); |
| 7476 | | - sqlite3_pcache *(*xCreate)(int szPage, int szExtra, int bPurgeable); |
| 7477 | | - void (*xCachesize)(sqlite3_pcache*, int nCachesize); |
| 7478 | | - int (*xPagecount)(sqlite3_pcache*); |
| 7479 | | - sqlite3_pcache_page *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag); |
| 7480 | | - void (*xUnpin)(sqlite3_pcache*, sqlite3_pcache_page*, int discard); |
| 7481 | | - void (*xRekey)(sqlite3_pcache*, sqlite3_pcache_page*, |
| 7501 | + int (SQLITE_CALLBACK *xInit)(void*); |
| 7502 | + void (SQLITE_CALLBACK *xShutdown)(void*); |
| 7503 | + sqlite3_pcache *(SQLITE_CALLBACK *xCreate)(int szPage, int szExtra, int bPurgeable); |
| 7504 | + void (SQLITE_CALLBACK *xCachesize)(sqlite3_pcache*, int nCachesize); |
| 7505 | + int (SQLITE_CALLBACK *xPagecount)(sqlite3_pcache*); |
| 7506 | + sqlite3_pcache_page *(SQLITE_CALLBACK *xFetch)(sqlite3_pcache*, unsigned key, int createFlag); |
| 7507 | + void (SQLITE_CALLBACK *xUnpin)(sqlite3_pcache*, sqlite3_pcache_page*, int discard); |
| 7508 | + void (SQLITE_CALLBACK *xRekey)(sqlite3_pcache*, sqlite3_pcache_page*, |
| 7482 | 7509 | unsigned oldKey, unsigned newKey); |
| 7483 | | - void (*xTruncate)(sqlite3_pcache*, unsigned iLimit); |
| 7484 | | - void (*xDestroy)(sqlite3_pcache*); |
| 7485 | | - void (*xShrink)(sqlite3_pcache*); |
| 7510 | + void (SQLITE_CALLBACK *xTruncate)(sqlite3_pcache*, unsigned iLimit); |
| 7511 | + void (SQLITE_CALLBACK *xDestroy)(sqlite3_pcache*); |
| 7512 | + void (SQLITE_CALLBACK *xShrink)(sqlite3_pcache*); |
| 7486 | 7513 | }; |
| 7487 | 7514 | |
| 7488 | 7515 | /* |
| 7489 | 7516 | ** This is the obsolete pcache_methods object that has now been replaced |
| 7490 | 7517 | ** by sqlite3_pcache_methods2. This object is not used by SQLite. It is |
| | @@ -7491,20 +7518,20 @@ |
| 7491 | 7518 | ** retained in the header file for backwards compatibility only. |
| 7492 | 7519 | */ |
| 7493 | 7520 | typedef struct sqlite3_pcache_methods sqlite3_pcache_methods; |
| 7494 | 7521 | struct sqlite3_pcache_methods { |
| 7495 | 7522 | void *pArg; |
| 7496 | | - int (*xInit)(void*); |
| 7497 | | - void (*xShutdown)(void*); |
| 7498 | | - sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable); |
| 7499 | | - void (*xCachesize)(sqlite3_pcache*, int nCachesize); |
| 7500 | | - int (*xPagecount)(sqlite3_pcache*); |
| 7501 | | - void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag); |
| 7502 | | - void (*xUnpin)(sqlite3_pcache*, void*, int discard); |
| 7503 | | - void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey); |
| 7504 | | - void (*xTruncate)(sqlite3_pcache*, unsigned iLimit); |
| 7505 | | - void (*xDestroy)(sqlite3_pcache*); |
| 7523 | + int (SQLITE_CALLBACK *xInit)(void*); |
| 7524 | + void (SQLITE_CALLBACK *xShutdown)(void*); |
| 7525 | + sqlite3_pcache *(SQLITE_CALLBACK *xCreate)(int szPage, int bPurgeable); |
| 7526 | + void (SQLITE_CALLBACK *xCachesize)(sqlite3_pcache*, int nCachesize); |
| 7527 | + int (SQLITE_CALLBACK *xPagecount)(sqlite3_pcache*); |
| 7528 | + void *(SQLITE_CALLBACK *xFetch)(sqlite3_pcache*, unsigned key, int createFlag); |
| 7529 | + void (SQLITE_CALLBACK *xUnpin)(sqlite3_pcache*, void*, int discard); |
| 7530 | + void (SQLITE_CALLBACK *xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey); |
| 7531 | + void (SQLITE_CALLBACK *xTruncate)(sqlite3_pcache*, unsigned iLimit); |
| 7532 | + void (SQLITE_CALLBACK *xDestroy)(sqlite3_pcache*); |
| 7506 | 7533 | }; |
| 7507 | 7534 | |
| 7508 | 7535 | |
| 7509 | 7536 | /* |
| 7510 | 7537 | ** CAPI3REF: Online Backup Object |
| | @@ -7702,20 +7729,20 @@ |
| 7702 | 7729 | ** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount() |
| 7703 | 7730 | ** APIs are not strictly speaking threadsafe. If they are invoked at the |
| 7704 | 7731 | ** same time as another thread is invoking sqlite3_backup_step() it is |
| 7705 | 7732 | ** possible that they return invalid values. |
| 7706 | 7733 | */ |
| 7707 | | -SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init( |
| 7734 | +SQLITE_API sqlite3_backup *SQLITE_APICALL sqlite3_backup_init( |
| 7708 | 7735 | sqlite3 *pDest, /* Destination database handle */ |
| 7709 | 7736 | const char *zDestName, /* Destination database name */ |
| 7710 | 7737 | sqlite3 *pSource, /* Source database handle */ |
| 7711 | 7738 | const char *zSourceName /* Source database name */ |
| 7712 | 7739 | ); |
| 7713 | | -SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage); |
| 7714 | | -SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p); |
| 7715 | | -SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p); |
| 7716 | | -SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p); |
| 7740 | +SQLITE_API int SQLITE_APICALL sqlite3_backup_step(sqlite3_backup *p, int nPage); |
| 7741 | +SQLITE_API int SQLITE_APICALL sqlite3_backup_finish(sqlite3_backup *p); |
| 7742 | +SQLITE_API int SQLITE_APICALL sqlite3_backup_remaining(sqlite3_backup *p); |
| 7743 | +SQLITE_API int SQLITE_APICALL sqlite3_backup_pagecount(sqlite3_backup *p); |
| 7717 | 7744 | |
| 7718 | 7745 | /* |
| 7719 | 7746 | ** CAPI3REF: Unlock Notification |
| 7720 | 7747 | ** METHOD: sqlite3 |
| 7721 | 7748 | ** |
| | @@ -7828,13 +7855,13 @@ |
| 7828 | 7855 | ** by an sqlite3_step() call. ^(If there is a blocking connection, then the |
| 7829 | 7856 | ** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in |
| 7830 | 7857 | ** the special "DROP TABLE/INDEX" case, the extended error code is just |
| 7831 | 7858 | ** SQLITE_LOCKED.)^ |
| 7832 | 7859 | */ |
| 7833 | | -SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify( |
| 7860 | +SQLITE_API int SQLITE_APICALL sqlite3_unlock_notify( |
| 7834 | 7861 | sqlite3 *pBlocked, /* Waiting connection */ |
| 7835 | | - void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */ |
| 7862 | + void (SQLITE_CALLBACK *xNotify)(void **apArg, int nArg), /* Callback function to invoke */ |
| 7836 | 7863 | void *pNotifyArg /* Argument to pass to xNotify */ |
| 7837 | 7864 | ); |
| 7838 | 7865 | |
| 7839 | 7866 | |
| 7840 | 7867 | /* |
| | @@ -7843,12 +7870,12 @@ |
| 7843 | 7870 | ** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications |
| 7844 | 7871 | ** and extensions to compare the contents of two buffers containing UTF-8 |
| 7845 | 7872 | ** strings in a case-independent fashion, using the same definition of "case |
| 7846 | 7873 | ** independence" that SQLite uses internally when comparing identifiers. |
| 7847 | 7874 | */ |
| 7848 | | -SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *, const char *); |
| 7849 | | -SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *, const char *, int); |
| 7875 | +SQLITE_API int SQLITE_APICALL sqlite3_stricmp(const char *, const char *); |
| 7876 | +SQLITE_API int SQLITE_APICALL sqlite3_strnicmp(const char *, const char *, int); |
| 7850 | 7877 | |
| 7851 | 7878 | /* |
| 7852 | 7879 | ** CAPI3REF: String Globbing |
| 7853 | 7880 | * |
| 7854 | 7881 | ** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if |
| | @@ -7861,11 +7888,11 @@ |
| 7861 | 7888 | ** Note that this routine returns zero on a match and non-zero if the strings |
| 7862 | 7889 | ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. |
| 7863 | 7890 | ** |
| 7864 | 7891 | ** See also: [sqlite3_strlike()]. |
| 7865 | 7892 | */ |
| 7866 | | -SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlob, const char *zStr); |
| 7893 | +SQLITE_API int SQLITE_APICALL sqlite3_strglob(const char *zGlob, const char *zStr); |
| 7867 | 7894 | |
| 7868 | 7895 | /* |
| 7869 | 7896 | ** CAPI3REF: String LIKE Matching |
| 7870 | 7897 | * |
| 7871 | 7898 | ** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if |
| | @@ -7884,11 +7911,11 @@ |
| 7884 | 7911 | ** Note that this routine returns zero on a match and non-zero if the strings |
| 7885 | 7912 | ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. |
| 7886 | 7913 | ** |
| 7887 | 7914 | ** See also: [sqlite3_strglob()]. |
| 7888 | 7915 | */ |
| 7889 | | -SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc); |
| 7916 | +SQLITE_API int SQLITE_APICALL sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc); |
| 7890 | 7917 | |
| 7891 | 7918 | /* |
| 7892 | 7919 | ** CAPI3REF: Error Logging Interface |
| 7893 | 7920 | ** |
| 7894 | 7921 | ** ^The [sqlite3_log()] interface writes a message into the [error log] |
| | @@ -7943,13 +7970,13 @@ |
| 7943 | 7970 | ** previously registered write-ahead log callback. ^Note that the |
| 7944 | 7971 | ** [sqlite3_wal_autocheckpoint()] interface and the |
| 7945 | 7972 | ** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will |
| 7946 | 7973 | ** overwrite any prior [sqlite3_wal_hook()] settings. |
| 7947 | 7974 | */ |
| 7948 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook( |
| 7975 | +SQLITE_API void *SQLITE_APICALL sqlite3_wal_hook( |
| 7949 | 7976 | sqlite3*, |
| 7950 | | - int(*)(void *,sqlite3*,const char*,int), |
| 7977 | + int(SQLITE_CALLBACK *)(void *,sqlite3*,const char*,int), |
| 7951 | 7978 | void* |
| 7952 | 7979 | ); |
| 7953 | 7980 | |
| 7954 | 7981 | /* |
| 7955 | 7982 | ** CAPI3REF: Configure an auto-checkpoint |
| | @@ -7978,11 +8005,11 @@ |
| 7978 | 8005 | ** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT] |
| 7979 | 8006 | ** pages. The use of this interface |
| 7980 | 8007 | ** is only necessary if the default setting is found to be suboptimal |
| 7981 | 8008 | ** for a particular application. |
| 7982 | 8009 | */ |
| 7983 | | -SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N); |
| 8010 | +SQLITE_API int SQLITE_APICALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N); |
| 7984 | 8011 | |
| 7985 | 8012 | /* |
| 7986 | 8013 | ** CAPI3REF: Checkpoint a database |
| 7987 | 8014 | ** METHOD: sqlite3 |
| 7988 | 8015 | ** |
| | @@ -8000,11 +8027,11 @@ |
| 8000 | 8027 | ** interface was added. This interface is retained for backwards |
| 8001 | 8028 | ** compatibility and as a convenience for applications that need to manually |
| 8002 | 8029 | ** start a callback but which do not need the full power (and corresponding |
| 8003 | 8030 | ** complication) of [sqlite3_wal_checkpoint_v2()]. |
| 8004 | 8031 | */ |
| 8005 | | -SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb); |
| 8032 | +SQLITE_API int SQLITE_APICALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb); |
| 8006 | 8033 | |
| 8007 | 8034 | /* |
| 8008 | 8035 | ** CAPI3REF: Checkpoint a database |
| 8009 | 8036 | ** METHOD: sqlite3 |
| 8010 | 8037 | ** |
| | @@ -8094,11 +8121,11 @@ |
| 8094 | 8121 | ** [sqlite3_errcode()] and [sqlite3_errmsg()]. |
| 8095 | 8122 | ** |
| 8096 | 8123 | ** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface |
| 8097 | 8124 | ** from SQL. |
| 8098 | 8125 | */ |
| 8099 | | -SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2( |
| 8126 | +SQLITE_API int SQLITE_APICALL sqlite3_wal_checkpoint_v2( |
| 8100 | 8127 | sqlite3 *db, /* Database handle */ |
| 8101 | 8128 | const char *zDb, /* Name of attached database (or NULL) */ |
| 8102 | 8129 | int eMode, /* SQLITE_CHECKPOINT_* value */ |
| 8103 | 8130 | int *pnLog, /* OUT: Size of WAL log in frames */ |
| 8104 | 8131 | int *pnCkpt /* OUT: Total number of frames checkpointed */ |
| | @@ -8183,11 +8210,11 @@ |
| 8183 | 8210 | ** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL], |
| 8184 | 8211 | ** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode |
| 8185 | 8212 | ** of the SQL statement that triggered the call to the [xUpdate] method of the |
| 8186 | 8213 | ** [virtual table]. |
| 8187 | 8214 | */ |
| 8188 | | -SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *); |
| 8215 | +SQLITE_API int SQLITE_APICALL sqlite3_vtab_on_conflict(sqlite3 *); |
| 8189 | 8216 | |
| 8190 | 8217 | /* |
| 8191 | 8218 | ** CAPI3REF: Conflict resolution modes |
| 8192 | 8219 | ** KEYWORDS: {conflict resolution mode} |
| 8193 | 8220 | ** |
| | @@ -8288,11 +8315,11 @@ |
| 8288 | 8315 | ** as if the loop did not exist - it returns non-zero and leave the variable |
| 8289 | 8316 | ** that pOut points to unchanged. |
| 8290 | 8317 | ** |
| 8291 | 8318 | ** See also: [sqlite3_stmt_scanstatus_reset()] |
| 8292 | 8319 | */ |
| 8293 | | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus( |
| 8320 | +SQLITE_API int SQLITE_APICALL sqlite3_stmt_scanstatus( |
| 8294 | 8321 | sqlite3_stmt *pStmt, /* Prepared statement for which info desired */ |
| 8295 | 8322 | int idx, /* Index of loop to report on */ |
| 8296 | 8323 | int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */ |
| 8297 | 8324 | void *pOut /* Result written here */ |
| 8298 | 8325 | ); |
| | @@ -8304,11 +8331,11 @@ |
| 8304 | 8331 | ** ^Zero all [sqlite3_stmt_scanstatus()] related event counters. |
| 8305 | 8332 | ** |
| 8306 | 8333 | ** This API is only available if the library is built with pre-processor |
| 8307 | 8334 | ** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined. |
| 8308 | 8335 | */ |
| 8309 | | -SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); |
| 8336 | +SQLITE_API void SQLITE_APICALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); |
| 8310 | 8337 | |
| 8311 | 8338 | /* |
| 8312 | 8339 | ** CAPI3REF: Flush caches to disk mid-transaction |
| 8313 | 8340 | ** |
| 8314 | 8341 | ** ^If a write-transaction is open on [database connection] D when the |
| | @@ -8336,11 +8363,11 @@ |
| 8336 | 8363 | ** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK. |
| 8337 | 8364 | ** |
| 8338 | 8365 | ** ^This function does not set the database handle error code or message |
| 8339 | 8366 | ** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions. |
| 8340 | 8367 | */ |
| 8341 | | -SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*); |
| 8368 | +SQLITE_API int SQLITE_APICALL sqlite3_db_cacheflush(sqlite3*); |
| 8342 | 8369 | |
| 8343 | 8370 | /* |
| 8344 | 8371 | ** CAPI3REF: The pre-update hook. |
| 8345 | 8372 | ** |
| 8346 | 8373 | ** ^These interfaces are only available if SQLite is compiled using the |
| | @@ -8416,13 +8443,13 @@ |
| 8416 | 8443 | ** triggers; or 2 for changes resulting from triggers called by top-level |
| 8417 | 8444 | ** triggers; and so forth. |
| 8418 | 8445 | ** |
| 8419 | 8446 | ** See also: [sqlite3_update_hook()] |
| 8420 | 8447 | */ |
| 8421 | | -SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_preupdate_hook( |
| 8448 | +SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_APICALL sqlite3_preupdate_hook( |
| 8422 | 8449 | sqlite3 *db, |
| 8423 | | - void(*xPreUpdate)( |
| 8450 | + void(SQLITE_CALLBACK *xPreUpdate)( |
| 8424 | 8451 | void *pCtx, /* Copy of third arg to preupdate_hook() */ |
| 8425 | 8452 | sqlite3 *db, /* Database handle */ |
| 8426 | 8453 | int op, /* SQLITE_UPDATE, DELETE or INSERT */ |
| 8427 | 8454 | char const *zDb, /* Database name */ |
| 8428 | 8455 | char const *zName, /* Table name */ |
| | @@ -8429,14 +8456,14 @@ |
| 8429 | 8456 | sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */ |
| 8430 | 8457 | sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */ |
| 8431 | 8458 | ), |
| 8432 | 8459 | void* |
| 8433 | 8460 | ); |
| 8434 | | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **); |
| 8435 | | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *); |
| 8436 | | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *); |
| 8437 | | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **); |
| 8461 | +SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **); |
| 8462 | +SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_preupdate_count(sqlite3 *); |
| 8463 | +SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_preupdate_depth(sqlite3 *); |
| 8464 | +SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **); |
| 8438 | 8465 | |
| 8439 | 8466 | /* |
| 8440 | 8467 | ** CAPI3REF: Low-level system error code |
| 8441 | 8468 | ** |
| 8442 | 8469 | ** ^Attempt to return the underlying operating system error code or error |
| | @@ -8444,11 +8471,11 @@ |
| 8444 | 8471 | ** The return value is OS-dependent. For example, on unix systems, after |
| 8445 | 8472 | ** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be |
| 8446 | 8473 | ** called to get back the underlying "errno" that caused the problem, such |
| 8447 | 8474 | ** as ENOSPC, EAUTH, EISDIR, and so forth. |
| 8448 | 8475 | */ |
| 8449 | | -SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3*); |
| 8476 | +SQLITE_API int SQLITE_APICALL sqlite3_system_errno(sqlite3*); |
| 8450 | 8477 | |
| 8451 | 8478 | /* |
| 8452 | 8479 | ** CAPI3REF: Database Snapshot |
| 8453 | 8480 | ** KEYWORDS: {snapshot} |
| 8454 | 8481 | ** EXPERIMENTAL |
| | @@ -8494,11 +8521,11 @@ |
| 8494 | 8521 | ** to avoid a memory leak. |
| 8495 | 8522 | ** |
| 8496 | 8523 | ** The [sqlite3_snapshot_get()] interface is only available when the |
| 8497 | 8524 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8498 | 8525 | */ |
| 8499 | | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_get( |
| 8526 | +SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_snapshot_get( |
| 8500 | 8527 | sqlite3 *db, |
| 8501 | 8528 | const char *zSchema, |
| 8502 | 8529 | sqlite3_snapshot **ppSnapshot |
| 8503 | 8530 | ); |
| 8504 | 8531 | |
| | @@ -8532,11 +8559,11 @@ |
| 8532 | 8559 | ** database connection in order to make it ready to use snapshots.) |
| 8533 | 8560 | ** |
| 8534 | 8561 | ** The [sqlite3_snapshot_open()] interface is only available when the |
| 8535 | 8562 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8536 | 8563 | */ |
| 8537 | | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_open( |
| 8564 | +SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_snapshot_open( |
| 8538 | 8565 | sqlite3 *db, |
| 8539 | 8566 | const char *zSchema, |
| 8540 | 8567 | sqlite3_snapshot *pSnapshot |
| 8541 | 8568 | ); |
| 8542 | 8569 | |
| | @@ -8549,11 +8576,11 @@ |
| 8549 | 8576 | ** using this routine to avoid a memory leak. |
| 8550 | 8577 | ** |
| 8551 | 8578 | ** The [sqlite3_snapshot_free()] interface is only available when the |
| 8552 | 8579 | ** SQLITE_ENABLE_SNAPSHOT compile-time option is used. |
| 8553 | 8580 | */ |
| 8554 | | -SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot*); |
| 8581 | +SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_APICALL sqlite3_snapshot_free(sqlite3_snapshot*); |
| 8555 | 8582 | |
| 8556 | 8583 | /* |
| 8557 | 8584 | ** CAPI3REF: Compare the ages of two snapshot handles. |
| 8558 | 8585 | ** EXPERIMENTAL |
| 8559 | 8586 | ** |
| | @@ -8573,11 +8600,11 @@ |
| 8573 | 8600 | ** |
| 8574 | 8601 | ** Otherwise, this API returns a negative value if P1 refers to an older |
| 8575 | 8602 | ** snapshot than P2, zero if the two handles refer to the same database |
| 8576 | 8603 | ** snapshot, and a positive value if P1 is a newer snapshot than P2. |
| 8577 | 8604 | */ |
| 8578 | | -SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_cmp( |
| 8605 | +SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_APICALL sqlite3_snapshot_cmp( |
| 8579 | 8606 | sqlite3_snapshot *p1, |
| 8580 | 8607 | sqlite3_snapshot *p2 |
| 8581 | 8608 | ); |
| 8582 | 8609 | |
| 8583 | 8610 | /* |
| | @@ -8631,14 +8658,14 @@ |
| 8631 | 8658 | ** Register a geometry callback named zGeom that can be used as part of an |
| 8632 | 8659 | ** R-Tree geometry query as follows: |
| 8633 | 8660 | ** |
| 8634 | 8661 | ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...) |
| 8635 | 8662 | */ |
| 8636 | | -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback( |
| 8663 | +SQLITE_API int SQLITE_APICALL sqlite3_rtree_geometry_callback( |
| 8637 | 8664 | sqlite3 *db, |
| 8638 | 8665 | const char *zGeom, |
| 8639 | | - int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*), |
| 8666 | + int (SQLITE_CALLBACK *xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*), |
| 8640 | 8667 | void *pContext |
| 8641 | 8668 | ); |
| 8642 | 8669 | |
| 8643 | 8670 | |
| 8644 | 8671 | /* |
| | @@ -8648,25 +8675,25 @@ |
| 8648 | 8675 | struct sqlite3_rtree_geometry { |
| 8649 | 8676 | void *pContext; /* Copy of pContext passed to s_r_g_c() */ |
| 8650 | 8677 | int nParam; /* Size of array aParam[] */ |
| 8651 | 8678 | sqlite3_rtree_dbl *aParam; /* Parameters passed to SQL geom function */ |
| 8652 | 8679 | void *pUser; /* Callback implementation user data */ |
| 8653 | | - void (*xDelUser)(void *); /* Called by SQLite to clean up pUser */ |
| 8680 | + void (SQLITE_CALLBACK *xDelUser)(void *); /* Called by SQLite to clean up pUser */ |
| 8654 | 8681 | }; |
| 8655 | 8682 | |
| 8656 | 8683 | /* |
| 8657 | 8684 | ** Register a 2nd-generation geometry callback named zScore that can be |
| 8658 | 8685 | ** used as part of an R-Tree geometry query as follows: |
| 8659 | 8686 | ** |
| 8660 | 8687 | ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...) |
| 8661 | 8688 | */ |
| 8662 | | -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback( |
| 8689 | +SQLITE_API int SQLITE_APICALL sqlite3_rtree_query_callback( |
| 8663 | 8690 | sqlite3 *db, |
| 8664 | 8691 | const char *zQueryFunc, |
| 8665 | | - int (*xQueryFunc)(sqlite3_rtree_query_info*), |
| 8692 | + int (SQLITE_CALLBACK *xQueryFunc)(sqlite3_rtree_query_info*), |
| 8666 | 8693 | void *pContext, |
| 8667 | | - void (*xDestructor)(void*) |
| 8694 | + void (SQLITE_CALLBACK *xDestructor)(void*) |
| 8668 | 8695 | ); |
| 8669 | 8696 | |
| 8670 | 8697 | |
| 8671 | 8698 | /* |
| 8672 | 8699 | ** A pointer to a structure of the following type is passed as the |
| | @@ -8680,11 +8707,11 @@ |
| 8680 | 8707 | struct sqlite3_rtree_query_info { |
| 8681 | 8708 | void *pContext; /* pContext from when function registered */ |
| 8682 | 8709 | int nParam; /* Number of function parameters */ |
| 8683 | 8710 | sqlite3_rtree_dbl *aParam; /* value of function parameters */ |
| 8684 | 8711 | void *pUser; /* callback can use this, if desired */ |
| 8685 | | - void (*xDelUser)(void*); /* function to free pUser */ |
| 8712 | + void (SQLITE_CALLBACK *xDelUser)(void*); /* function to free pUser */ |
| 8686 | 8713 | sqlite3_rtree_dbl *aCoord; /* Coordinates of node or entry to check */ |
| 8687 | 8714 | unsigned int *anQueue; /* Number of pending entries in the queue */ |
| 8688 | 8715 | int nCoord; /* Number of coordinates */ |
| 8689 | 8716 | int iLevel; /* Level of current node or entry */ |
| 8690 | 8717 | int mxLevel; /* The largest iLevel value in the tree */ |
| | @@ -8876,11 +8903,11 @@ |
| 8876 | 8903 | ** If xFilter returns 0, changes is not tracked. Note that once a table is |
| 8877 | 8904 | ** attached, xFilter will not be called again. |
| 8878 | 8905 | */ |
| 8879 | 8906 | void sqlite3session_table_filter( |
| 8880 | 8907 | sqlite3_session *pSession, /* Session object */ |
| 8881 | | - int(*xFilter)( |
| 8908 | + int(SQLITE_CALLBACK *xFilter)( |
| 8882 | 8909 | void *pCtx, /* Copy of third arg to _filter_table() */ |
| 8883 | 8910 | const char *zTab /* Table name */ |
| 8884 | 8911 | ), |
| 8885 | 8912 | void *pCtx /* First argument passed to xFilter */ |
| 8886 | 8913 | ); |
| | @@ -9451,11 +9478,11 @@ |
| 9451 | 9478 | ** An sqlite3_changegroup object is used to combine two or more changesets |
| 9452 | 9479 | ** (or patchsets) into a single changeset (or patchset). A single changegroup |
| 9453 | 9480 | ** object may combine changesets or patchsets, but not both. The output is |
| 9454 | 9481 | ** always in the same format as the input. |
| 9455 | 9482 | ** |
| 9456 | | -** If successful, this function returns SQLITE_OK and populates (*pp) with |
| 9483 | +** If successful, this function returns SQLITE_OK and populates (SQLITE_CALLBACK *pp) with |
| 9457 | 9484 | ** a pointer to a new sqlite3_changegroup object before returning. The caller |
| 9458 | 9485 | ** should eventually free the returned object using a call to |
| 9459 | 9486 | ** sqlite3changegroup_delete(). If an error occurs, an SQLite error code |
| 9460 | 9487 | ** (i.e. SQLITE_NOMEM) is returned and *pp is set to NULL. |
| 9461 | 9488 | ** |
| | @@ -9571,11 +9598,11 @@ |
| 9571 | 9598 | ** changes for tables that do not appear in the first changeset, they are |
| 9572 | 9599 | ** appended onto the end of the output changeset, again in the order in |
| 9573 | 9600 | ** which they are first encountered. |
| 9574 | 9601 | ** |
| 9575 | 9602 | ** If an error occurs, an SQLite error code is returned and the output |
| 9576 | | -** variables (*pnData) and (*ppData) are set to 0. Otherwise, SQLITE_OK |
| 9603 | +** variables (SQLITE_CALLBACK *pnData) and (*ppData) are set to 0. Otherwise, SQLITE_OK |
| 9577 | 9604 | ** is returned and the output variables are set to the size of and a |
| 9578 | 9605 | ** pointer to the output buffer, respectively. In this case it is the |
| 9579 | 9606 | ** responsibility of the caller to eventually free the buffer using a |
| 9580 | 9607 | ** call to sqlite3_free(). |
| 9581 | 9608 | */ |
| | @@ -9728,15 +9755,15 @@ |
| 9728 | 9755 | */ |
| 9729 | 9756 | int sqlite3changeset_apply( |
| 9730 | 9757 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 9731 | 9758 | int nChangeset, /* Size of changeset in bytes */ |
| 9732 | 9759 | void *pChangeset, /* Changeset blob */ |
| 9733 | | - int(*xFilter)( |
| 9760 | + int(SQLITE_CALLBACK *xFilter)( |
| 9734 | 9761 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9735 | 9762 | const char *zTab /* Table name */ |
| 9736 | 9763 | ), |
| 9737 | | - int(*xConflict)( |
| 9764 | + int(SQLITE_CALLBACK *xConflict)( |
| 9738 | 9765 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9739 | 9766 | int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */ |
| 9740 | 9767 | sqlite3_changeset_iter *p /* Handle describing change and conflict */ |
| 9741 | 9768 | ), |
| 9742 | 9769 | void *pCtx /* First argument passed to xConflict */ |
| | @@ -9873,20 +9900,20 @@ |
| 9873 | 9900 | ** </pre> |
| 9874 | 9901 | ** |
| 9875 | 9902 | ** Is replaced by: |
| 9876 | 9903 | ** |
| 9877 | 9904 | ** <pre> |
| 9878 | | -** int (*xInput)(void *pIn, void *pData, int *pnData), |
| 9905 | +** int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), |
| 9879 | 9906 | ** void *pIn, |
| 9880 | 9907 | ** </pre> |
| 9881 | 9908 | ** |
| 9882 | 9909 | ** Each time the xInput callback is invoked by the sessions module, the first |
| 9883 | 9910 | ** argument passed is a copy of the supplied pIn context pointer. The second |
| 9884 | | -** argument, pData, points to a buffer (*pnData) bytes in size. Assuming no |
| 9885 | | -** error occurs the xInput method should copy up to (*pnData) bytes of data |
| 9886 | | -** into the buffer and set (*pnData) to the actual number of bytes copied |
| 9887 | | -** before returning SQLITE_OK. If the input is completely exhausted, (*pnData) |
| 9911 | +** argument, pData, points to a buffer (SQLITE_CALLBACK *pnData) bytes in size. Assuming no |
| 9912 | +** error occurs the xInput method should copy up to (SQLITE_CALLBACK *pnData) bytes of data |
| 9913 | +** into the buffer and set (SQLITE_CALLBACK *pnData) to the actual number of bytes copied |
| 9914 | +** before returning SQLITE_OK. If the input is completely exhausted, (SQLITE_CALLBACK *pnData) |
| 9888 | 9915 | ** should be set to zero to indicate this. Or, if an error occurs, an SQLite |
| 9889 | 9916 | ** error code should be returned. In all cases, if an xInput callback returns |
| 9890 | 9917 | ** an error, all processing is abandoned and the streaming API function |
| 9891 | 9918 | ** returns a copy of the error code to the caller. |
| 9892 | 9919 | ** |
| | @@ -9907,11 +9934,11 @@ |
| 9907 | 9934 | ** </pre> |
| 9908 | 9935 | ** |
| 9909 | 9936 | ** Is replaced by: |
| 9910 | 9937 | ** |
| 9911 | 9938 | ** <pre> |
| 9912 | | -** int (*xOutput)(void *pOut, const void *pData, int nData), |
| 9939 | +** int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), |
| 9913 | 9940 | ** void *pOut |
| 9914 | 9941 | ** </pre> |
| 9915 | 9942 | ** |
| 9916 | 9943 | ** The xOutput callback is invoked zero or more times to return data to |
| 9917 | 9944 | ** the application. The first parameter passed to each call is a copy of the |
| | @@ -9927,58 +9954,58 @@ |
| 9927 | 9954 | ** parameter set to a value less than or equal to zero. Other than this, |
| 9928 | 9955 | ** no guarantees are made as to the size of the chunks of data returned. |
| 9929 | 9956 | */ |
| 9930 | 9957 | int sqlite3changeset_apply_strm( |
| 9931 | 9958 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 9932 | | - int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */ |
| 9959 | + int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), /* Input function */ |
| 9933 | 9960 | void *pIn, /* First arg for xInput */ |
| 9934 | | - int(*xFilter)( |
| 9961 | + int(SQLITE_CALLBACK *xFilter)( |
| 9935 | 9962 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9936 | 9963 | const char *zTab /* Table name */ |
| 9937 | 9964 | ), |
| 9938 | | - int(*xConflict)( |
| 9965 | + int(SQLITE_CALLBACK *xConflict)( |
| 9939 | 9966 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| 9940 | 9967 | int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */ |
| 9941 | 9968 | sqlite3_changeset_iter *p /* Handle describing change and conflict */ |
| 9942 | 9969 | ), |
| 9943 | 9970 | void *pCtx /* First argument passed to xConflict */ |
| 9944 | 9971 | ); |
| 9945 | 9972 | int sqlite3changeset_concat_strm( |
| 9946 | | - int (*xInputA)(void *pIn, void *pData, int *pnData), |
| 9973 | + int (SQLITE_CALLBACK *xInputA)(void *pIn, void *pData, int *pnData), |
| 9947 | 9974 | void *pInA, |
| 9948 | | - int (*xInputB)(void *pIn, void *pData, int *pnData), |
| 9975 | + int (SQLITE_CALLBACK *xInputB)(void *pIn, void *pData, int *pnData), |
| 9949 | 9976 | void *pInB, |
| 9950 | | - int (*xOutput)(void *pOut, const void *pData, int nData), |
| 9977 | + int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), |
| 9951 | 9978 | void *pOut |
| 9952 | 9979 | ); |
| 9953 | 9980 | int sqlite3changeset_invert_strm( |
| 9954 | | - int (*xInput)(void *pIn, void *pData, int *pnData), |
| 9981 | + int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), |
| 9955 | 9982 | void *pIn, |
| 9956 | | - int (*xOutput)(void *pOut, const void *pData, int nData), |
| 9983 | + int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), |
| 9957 | 9984 | void *pOut |
| 9958 | 9985 | ); |
| 9959 | 9986 | int sqlite3changeset_start_strm( |
| 9960 | 9987 | sqlite3_changeset_iter **pp, |
| 9961 | | - int (*xInput)(void *pIn, void *pData, int *pnData), |
| 9988 | + int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), |
| 9962 | 9989 | void *pIn |
| 9963 | 9990 | ); |
| 9964 | 9991 | int sqlite3session_changeset_strm( |
| 9965 | 9992 | sqlite3_session *pSession, |
| 9966 | | - int (*xOutput)(void *pOut, const void *pData, int nData), |
| 9993 | + int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), |
| 9967 | 9994 | void *pOut |
| 9968 | 9995 | ); |
| 9969 | 9996 | int sqlite3session_patchset_strm( |
| 9970 | 9997 | sqlite3_session *pSession, |
| 9971 | | - int (*xOutput)(void *pOut, const void *pData, int nData), |
| 9998 | + int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), |
| 9972 | 9999 | void *pOut |
| 9973 | 10000 | ); |
| 9974 | 10001 | int sqlite3changegroup_add_strm(sqlite3_changegroup*, |
| 9975 | | - int (*xInput)(void *pIn, void *pData, int *pnData), |
| 10002 | + int (SQLITE_CALLBACK *xInput)(void *pIn, void *pData, int *pnData), |
| 9976 | 10003 | void *pIn |
| 9977 | 10004 | ); |
| 9978 | 10005 | int sqlite3changegroup_output_strm(sqlite3_changegroup*, |
| 9979 | | - int (*xOutput)(void *pOut, const void *pData, int nData), |
| 10006 | + int (SQLITE_CALLBACK *xOutput)(void *pOut, const void *pData, int nData), |
| 9980 | 10007 | void *pOut |
| 9981 | 10008 | ); |
| 9982 | 10009 | |
| 9983 | 10010 | |
| 9984 | 10011 | /* |
| | @@ -10029,11 +10056,11 @@ |
| 10029 | 10056 | |
| 10030 | 10057 | typedef struct Fts5ExtensionApi Fts5ExtensionApi; |
| 10031 | 10058 | typedef struct Fts5Context Fts5Context; |
| 10032 | 10059 | typedef struct Fts5PhraseIter Fts5PhraseIter; |
| 10033 | 10060 | |
| 10034 | | -typedef void (*fts5_extension_function)( |
| 10061 | +typedef void (SQLITE_CALLBACK *fts5_extension_function)( |
| 10035 | 10062 | const Fts5ExtensionApi *pApi, /* API offered by current FTS version */ |
| 10036 | 10063 | Fts5Context *pFts, /* First arg to pass to pApi functions */ |
| 10037 | 10064 | sqlite3_context *pCtx, /* Context for returning result/error */ |
| 10038 | 10065 | int nVal, /* Number of values in apVal[] array */ |
| 10039 | 10066 | sqlite3_value **apVal /* Array of trailing arguments */ |
| | @@ -10080,15 +10107,15 @@ |
| 10080 | 10107 | ** This function may be quite inefficient if used with an FTS5 table |
| 10081 | 10108 | ** created with the "columnsize=0" option. |
| 10082 | 10109 | ** |
| 10083 | 10110 | ** xColumnText: |
| 10084 | 10111 | ** This function attempts to retrieve the text of column iCol of the |
| 10085 | | -** current document. If successful, (*pz) is set to point to a buffer |
| 10086 | | -** containing the text in utf-8 encoding, (*pn) is set to the size in bytes |
| 10112 | +** current document. If successful, (SQLITE_CALLBACK *pz) is set to point to a buffer |
| 10113 | +** containing the text in utf-8 encoding, (SQLITE_CALLBACK *pn) is set to the size in bytes |
| 10087 | 10114 | ** (not characters) of the buffer and SQLITE_OK is returned. Otherwise, |
| 10088 | 10115 | ** if an error occurs, an SQLite error code is returned and the final values |
| 10089 | | -** of (*pz) and (*pn) are undefined. |
| 10116 | +** of (SQLITE_CALLBACK *pz) and (*pn) are undefined. |
| 10090 | 10117 | ** |
| 10091 | 10118 | ** xPhraseCount: |
| 10092 | 10119 | ** Returns the number of phrases in the current query expression. |
| 10093 | 10120 | ** |
| 10094 | 10121 | ** xPhraseSize: |
| | @@ -10193,11 +10220,11 @@ |
| 10193 | 10220 | ** xRowCount(pFts5, pnRow) |
| 10194 | 10221 | ** |
| 10195 | 10222 | ** This function is used to retrieve the total number of rows in the table. |
| 10196 | 10223 | ** In other words, the same value that would be returned by: |
| 10197 | 10224 | ** |
| 10198 | | -** SELECT count(*) FROM ftstable; |
| 10225 | +** SELECT count(SQLITE_CALLBACK *) FROM ftstable; |
| 10199 | 10226 | ** |
| 10200 | 10227 | ** xPhraseFirst() |
| 10201 | 10228 | ** This function is used, along with type Fts5PhraseIter and the xPhraseNext |
| 10202 | 10229 | ** method, to iterate through all instances of a single query phrase within |
| 10203 | 10230 | ** the current row. This is the same information as is accessible via the |
| | @@ -10260,43 +10287,43 @@ |
| 10260 | 10287 | ** See xPhraseFirstColumn above. |
| 10261 | 10288 | */ |
| 10262 | 10289 | struct Fts5ExtensionApi { |
| 10263 | 10290 | int iVersion; /* Currently always set to 3 */ |
| 10264 | 10291 | |
| 10265 | | - void *(*xUserData)(Fts5Context*); |
| 10292 | + void *(SQLITE_CALLBACK *xUserData)(Fts5Context*); |
| 10266 | 10293 | |
| 10267 | | - int (*xColumnCount)(Fts5Context*); |
| 10268 | | - int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow); |
| 10269 | | - int (*xColumnTotalSize)(Fts5Context*, int iCol, sqlite3_int64 *pnToken); |
| 10294 | + int (SQLITE_CALLBACK *xColumnCount)(Fts5Context*); |
| 10295 | + int (SQLITE_CALLBACK *xRowCount)(Fts5Context*, sqlite3_int64 *pnRow); |
| 10296 | + int (SQLITE_CALLBACK *xColumnTotalSize)(Fts5Context*, int iCol, sqlite3_int64 *pnToken); |
| 10270 | 10297 | |
| 10271 | | - int (*xTokenize)(Fts5Context*, |
| 10298 | + int (SQLITE_CALLBACK *xTokenize)(Fts5Context*, |
| 10272 | 10299 | const char *pText, int nText, /* Text to tokenize */ |
| 10273 | 10300 | void *pCtx, /* Context passed to xToken() */ |
| 10274 | | - int (*xToken)(void*, int, const char*, int, int, int) /* Callback */ |
| 10275 | | - ); |
| 10276 | | - |
| 10277 | | - int (*xPhraseCount)(Fts5Context*); |
| 10278 | | - int (*xPhraseSize)(Fts5Context*, int iPhrase); |
| 10279 | | - |
| 10280 | | - int (*xInstCount)(Fts5Context*, int *pnInst); |
| 10281 | | - int (*xInst)(Fts5Context*, int iIdx, int *piPhrase, int *piCol, int *piOff); |
| 10282 | | - |
| 10283 | | - sqlite3_int64 (*xRowid)(Fts5Context*); |
| 10284 | | - int (*xColumnText)(Fts5Context*, int iCol, const char **pz, int *pn); |
| 10285 | | - int (*xColumnSize)(Fts5Context*, int iCol, int *pnToken); |
| 10286 | | - |
| 10287 | | - int (*xQueryPhrase)(Fts5Context*, int iPhrase, void *pUserData, |
| 10288 | | - int(*)(const Fts5ExtensionApi*,Fts5Context*,void*) |
| 10289 | | - ); |
| 10290 | | - int (*xSetAuxdata)(Fts5Context*, void *pAux, void(*xDelete)(void*)); |
| 10291 | | - void *(*xGetAuxdata)(Fts5Context*, int bClear); |
| 10292 | | - |
| 10293 | | - int (*xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*); |
| 10294 | | - void (*xPhraseNext)(Fts5Context*, Fts5PhraseIter*, int *piCol, int *piOff); |
| 10295 | | - |
| 10296 | | - int (*xPhraseFirstColumn)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*); |
| 10297 | | - void (*xPhraseNextColumn)(Fts5Context*, Fts5PhraseIter*, int *piCol); |
| 10301 | + int (SQLITE_CALLBACK *xToken)(void*, int, const char*, int, int, int) /* Callback */ |
| 10302 | + ); |
| 10303 | + |
| 10304 | + int (SQLITE_CALLBACK *xPhraseCount)(Fts5Context*); |
| 10305 | + int (SQLITE_CALLBACK *xPhraseSize)(Fts5Context*, int iPhrase); |
| 10306 | + |
| 10307 | + int (SQLITE_CALLBACK *xInstCount)(Fts5Context*, int *pnInst); |
| 10308 | + int (SQLITE_CALLBACK *xInst)(Fts5Context*, int iIdx, int *piPhrase, int *piCol, int *piOff); |
| 10309 | + |
| 10310 | + sqlite3_int64 (SQLITE_CALLBACK *xRowid)(Fts5Context*); |
| 10311 | + int (SQLITE_CALLBACK *xColumnText)(Fts5Context*, int iCol, const char **pz, int *pn); |
| 10312 | + int (SQLITE_CALLBACK *xColumnSize)(Fts5Context*, int iCol, int *pnToken); |
| 10313 | + |
| 10314 | + int (SQLITE_CALLBACK *xQueryPhrase)(Fts5Context*, int iPhrase, void *pUserData, |
| 10315 | + int(SQLITE_CALLBACK *)(const Fts5ExtensionApi*,Fts5Context*,void*) |
| 10316 | + ); |
| 10317 | + int (SQLITE_CALLBACK *xSetAuxdata)(Fts5Context*, void *pAux, void(*xDelete)(void*)); |
| 10318 | + void *(SQLITE_CALLBACK *xGetAuxdata)(Fts5Context*, int bClear); |
| 10319 | + |
| 10320 | + int (SQLITE_CALLBACK *xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*); |
| 10321 | + void (SQLITE_CALLBACK *xPhraseNext)(Fts5Context*, Fts5PhraseIter*, int *piCol, int *piOff); |
| 10322 | + |
| 10323 | + int (SQLITE_CALLBACK *xPhraseFirstColumn)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*); |
| 10324 | + void (SQLITE_CALLBACK *xPhraseNextColumn)(Fts5Context*, Fts5PhraseIter*, int *piCol); |
| 10298 | 10325 | }; |
| 10299 | 10326 | |
| 10300 | 10327 | /* |
| 10301 | 10328 | ** CUSTOM AUXILIARY FUNCTIONS |
| 10302 | 10329 | *************************************************************************/ |
| | @@ -10320,11 +10347,11 @@ |
| 10320 | 10347 | ** The second and third arguments are an array of nul-terminated strings |
| 10321 | 10348 | ** containing the tokenizer arguments, if any, specified following the |
| 10322 | 10349 | ** tokenizer name as part of the CREATE VIRTUAL TABLE statement used |
| 10323 | 10350 | ** to create the FTS5 table. |
| 10324 | 10351 | ** |
| 10325 | | -** The final argument is an output variable. If successful, (*ppOut) |
| 10352 | +** The final argument is an output variable. If successful, (SQLITE_CALLBACK *ppOut) |
| 10326 | 10353 | ** should be set to point to the new tokenizer handle and SQLITE_OK |
| 10327 | 10354 | ** returned. If an error occurs, some value other than SQLITE_OK should |
| 10328 | 10355 | ** be returned. In this case, fts5 assumes that the final value of *ppOut |
| 10329 | 10356 | ** is undefined. |
| 10330 | 10357 | ** |
| | @@ -10494,17 +10521,17 @@ |
| 10494 | 10521 | ** inefficient. |
| 10495 | 10522 | */ |
| 10496 | 10523 | typedef struct Fts5Tokenizer Fts5Tokenizer; |
| 10497 | 10524 | typedef struct fts5_tokenizer fts5_tokenizer; |
| 10498 | 10525 | struct fts5_tokenizer { |
| 10499 | | - int (*xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut); |
| 10500 | | - void (*xDelete)(Fts5Tokenizer*); |
| 10501 | | - int (*xTokenize)(Fts5Tokenizer*, |
| 10526 | + int (SQLITE_CALLBACK *xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut); |
| 10527 | + void (SQLITE_CALLBACK *xDelete)(Fts5Tokenizer*); |
| 10528 | + int (SQLITE_CALLBACK *xTokenize)(Fts5Tokenizer*, |
| 10502 | 10529 | void *pCtx, |
| 10503 | 10530 | int flags, /* Mask of FTS5_TOKENIZE_* flags */ |
| 10504 | 10531 | const char *pText, int nText, |
| 10505 | | - int (*xToken)( |
| 10532 | + int (SQLITE_CALLBACK *xToken)( |
| 10506 | 10533 | void *pCtx, /* Copy of 2nd argument to xTokenize() */ |
| 10507 | 10534 | int tflags, /* Mask of FTS5_TOKEN_* flags */ |
| 10508 | 10535 | const char *pToken, /* Pointer to buffer containing token */ |
| 10509 | 10536 | int nToken, /* Size of token in bytes */ |
| 10510 | 10537 | int iStart, /* Byte offset of token within input text */ |
| | @@ -10533,33 +10560,33 @@ |
| 10533 | 10560 | typedef struct fts5_api fts5_api; |
| 10534 | 10561 | struct fts5_api { |
| 10535 | 10562 | int iVersion; /* Currently always set to 2 */ |
| 10536 | 10563 | |
| 10537 | 10564 | /* Create a new tokenizer */ |
| 10538 | | - int (*xCreateTokenizer)( |
| 10565 | + int (SQLITE_CALLBACK *xCreateTokenizer)( |
| 10539 | 10566 | fts5_api *pApi, |
| 10540 | 10567 | const char *zName, |
| 10541 | 10568 | void *pContext, |
| 10542 | 10569 | fts5_tokenizer *pTokenizer, |
| 10543 | | - void (*xDestroy)(void*) |
| 10570 | + void (SQLITE_CALLBACK *xDestroy)(void*) |
| 10544 | 10571 | ); |
| 10545 | 10572 | |
| 10546 | 10573 | /* Find an existing tokenizer */ |
| 10547 | | - int (*xFindTokenizer)( |
| 10574 | + int (SQLITE_CALLBACK *xFindTokenizer)( |
| 10548 | 10575 | fts5_api *pApi, |
| 10549 | 10576 | const char *zName, |
| 10550 | 10577 | void **ppContext, |
| 10551 | 10578 | fts5_tokenizer *pTokenizer |
| 10552 | 10579 | ); |
| 10553 | 10580 | |
| 10554 | 10581 | /* Create a new auxiliary function */ |
| 10555 | | - int (*xCreateFunction)( |
| 10582 | + int (SQLITE_CALLBACK *xCreateFunction)( |
| 10556 | 10583 | fts5_api *pApi, |
| 10557 | 10584 | const char *zName, |
| 10558 | 10585 | void *pContext, |
| 10559 | 10586 | fts5_extension_function xFunction, |
| 10560 | | - void (*xDestroy)(void*) |
| 10587 | + void (SQLITE_CALLBACK *xDestroy)(void*) |
| 10561 | 10588 | ); |
| 10562 | 10589 | }; |
| 10563 | 10590 | |
| 10564 | 10591 | /* |
| 10565 | 10592 | ** END OF REGISTRATION API |
| | @@ -10867,11 +10894,11 @@ |
| 10867 | 10894 | ** Make sure that the compiler intrinsics we desire are enabled when |
| 10868 | 10895 | ** compiling with an appropriate version of MSVC unless prevented by |
| 10869 | 10896 | ** the SQLITE_DISABLE_INTRINSIC define. |
| 10870 | 10897 | */ |
| 10871 | 10898 | #if !defined(SQLITE_DISABLE_INTRINSIC) |
| 10872 | | -# if defined(_MSC_VER) && _MSC_VER>=1300 |
| 10899 | +# if defined(_MSC_VER) && _MSC_VER>=1400 |
| 10873 | 10900 | # if !defined(_WIN32_WCE) |
| 10874 | 10901 | # include <intrin.h> |
| 10875 | 10902 | # pragma intrinsic(_byteswap_ushort) |
| 10876 | 10903 | # pragma intrinsic(_byteswap_ulong) |
| 10877 | 10904 | # pragma intrinsic(_ReadWriteBarrier) |
| | @@ -11873,12 +11900,12 @@ |
| 11873 | 11900 | */ |
| 11874 | 11901 | #ifdef SQLITE_OMIT_WSD |
| 11875 | 11902 | #define SQLITE_WSD const |
| 11876 | 11903 | #define GLOBAL(t,v) (*(t*)sqlite3_wsd_find((void*)&(v), sizeof(v))) |
| 11877 | 11904 | #define sqlite3GlobalConfig GLOBAL(struct Sqlite3Config, sqlite3Config) |
| 11878 | | -SQLITE_API int SQLITE_STDCALL sqlite3_wsd_init(int N, int J); |
| 11879 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_wsd_find(void *K, int L); |
| 11905 | +SQLITE_API int SQLITE_APICALL sqlite3_wsd_init(int N, int J); |
| 11906 | +SQLITE_API void *SQLITE_APICALL sqlite3_wsd_find(void *K, int L); |
| 11880 | 11907 | #else |
| 11881 | 11908 | #define SQLITE_WSD |
| 11882 | 11909 | #define GLOBAL(t,v) v |
| 11883 | 11910 | #define sqlite3GlobalConfig sqlite3Config |
| 11884 | 11911 | #endif |
| | @@ -15834,10 +15861,11 @@ |
| 15834 | 15861 | int iCur; /* A cursor number */ |
| 15835 | 15862 | SrcList *pSrcList; /* FROM clause */ |
| 15836 | 15863 | struct SrcCount *pSrcCount; /* Counting column references */ |
| 15837 | 15864 | struct CCurHint *pCCurHint; /* Used by codeCursorHint() */ |
| 15838 | 15865 | int *aiCol; /* array of column indexes */ |
| 15866 | + struct IdxCover *pIdxCover; /* Check for index coverage */ |
| 15839 | 15867 | } u; |
| 15840 | 15868 | }; |
| 15841 | 15869 | |
| 15842 | 15870 | /* Forward declarations */ |
| 15843 | 15871 | SQLITE_PRIVATE int sqlite3WalkExpr(Walker*, Expr*); |
| | @@ -16277,10 +16305,11 @@ |
| 16277 | 16305 | SQLITE_PRIVATE int sqlite3ExprCompare(Expr*, Expr*, int); |
| 16278 | 16306 | SQLITE_PRIVATE int sqlite3ExprListCompare(ExprList*, ExprList*, int); |
| 16279 | 16307 | SQLITE_PRIVATE int sqlite3ExprImpliesExpr(Expr*, Expr*, int); |
| 16280 | 16308 | SQLITE_PRIVATE void sqlite3ExprAnalyzeAggregates(NameContext*, Expr*); |
| 16281 | 16309 | SQLITE_PRIVATE void sqlite3ExprAnalyzeAggList(NameContext*,ExprList*); |
| 16310 | +SQLITE_PRIVATE int sqlite3ExprCoveredByIndex(Expr*, int iCur, Index *pIdx); |
| 16282 | 16311 | SQLITE_PRIVATE int sqlite3FunctionUsesThisSrc(Expr*, SrcList*); |
| 16283 | 16312 | SQLITE_PRIVATE Vdbe *sqlite3GetVdbe(Parse*); |
| 16284 | 16313 | #ifndef SQLITE_OMIT_BUILTIN_TEST |
| 16285 | 16314 | SQLITE_PRIVATE void sqlite3PrngSaveState(void); |
| 16286 | 16315 | SQLITE_PRIVATE void sqlite3PrngRestoreState(void); |
| | @@ -17163,12 +17192,14 @@ |
| 17163 | 17192 | "CASE_SENSITIVE_LIKE", |
| 17164 | 17193 | #endif |
| 17165 | 17194 | #if SQLITE_CHECK_PAGES |
| 17166 | 17195 | "CHECK_PAGES", |
| 17167 | 17196 | #endif |
| 17168 | | -#if defined(__clang__) && defined(__clang_version__) |
| 17169 | | - "COMPILER=clang-" __clang_version__, |
| 17197 | +#if defined(__clang__) && defined(__clang_major__) |
| 17198 | + "COMPILER=clang-" CTIMEOPT_VAL(__clang_major__) "." |
| 17199 | + CTIMEOPT_VAL(__clang_minor__) "." |
| 17200 | + CTIMEOPT_VAL(__clang_patchlevel__), |
| 17170 | 17201 | #elif defined(_MSC_VER) |
| 17171 | 17202 | "COMPILER=msvc-" CTIMEOPT_VAL(_MSC_VER), |
| 17172 | 17203 | #elif defined(__GNUC__) && defined(__VERSION__) |
| 17173 | 17204 | "COMPILER=gcc-" __VERSION__, |
| 17174 | 17205 | #endif |
| | @@ -17529,11 +17560,11 @@ |
| 17529 | 17560 | ** was used and false if not. |
| 17530 | 17561 | ** |
| 17531 | 17562 | ** The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix |
| 17532 | 17563 | ** is not required for a match. |
| 17533 | 17564 | */ |
| 17534 | | -SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName){ |
| 17565 | +SQLITE_API int SQLITE_APICALL sqlite3_compileoption_used(const char *zOptName){ |
| 17535 | 17566 | int i, n; |
| 17536 | 17567 | |
| 17537 | 17568 | #if SQLITE_ENABLE_API_ARMOR |
| 17538 | 17569 | if( zOptName==0 ){ |
| 17539 | 17570 | (void)SQLITE_MISUSE_BKPT; |
| | @@ -17557,11 +17588,11 @@ |
| 17557 | 17588 | |
| 17558 | 17589 | /* |
| 17559 | 17590 | ** Return the N-th compile-time option string. If N is out of range, |
| 17560 | 17591 | ** return a NULL pointer. |
| 17561 | 17592 | */ |
| 17562 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N){ |
| 17593 | +SQLITE_API const char *SQLITE_APICALL sqlite3_compileoption_get(int N){ |
| 17563 | 17594 | if( N>=0 && N<ArraySize(azCompileOpt) ){ |
| 17564 | 17595 | return azCompileOpt[N]; |
| 17565 | 17596 | } |
| 17566 | 17597 | return 0; |
| 17567 | 17598 | } |
| | @@ -18267,11 +18298,11 @@ |
| 18267 | 18298 | } |
| 18268 | 18299 | |
| 18269 | 18300 | /* |
| 18270 | 18301 | ** Query status information. |
| 18271 | 18302 | */ |
| 18272 | | -SQLITE_API int SQLITE_STDCALL sqlite3_status64( |
| 18303 | +SQLITE_API int SQLITE_APICALL sqlite3_status64( |
| 18273 | 18304 | int op, |
| 18274 | 18305 | sqlite3_int64 *pCurrent, |
| 18275 | 18306 | sqlite3_int64 *pHighwater, |
| 18276 | 18307 | int resetFlag |
| 18277 | 18308 | ){ |
| | @@ -18292,12 +18323,12 @@ |
| 18292 | 18323 | } |
| 18293 | 18324 | sqlite3_mutex_leave(pMutex); |
| 18294 | 18325 | (void)pMutex; /* Prevent warning when SQLITE_THREADSAFE=0 */ |
| 18295 | 18326 | return SQLITE_OK; |
| 18296 | 18327 | } |
| 18297 | | -SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag){ |
| 18298 | | - sqlite3_int64 iCur, iHwtr; |
| 18328 | +SQLITE_API int SQLITE_APICALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag){ |
| 18329 | + sqlite3_int64 iCur = 0, iHwtr = 0; |
| 18299 | 18330 | int rc; |
| 18300 | 18331 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 18301 | 18332 | if( pCurrent==0 || pHighwater==0 ) return SQLITE_MISUSE_BKPT; |
| 18302 | 18333 | #endif |
| 18303 | 18334 | rc = sqlite3_status64(op, &iCur, &iHwtr, resetFlag); |
| | @@ -18309,11 +18340,11 @@ |
| 18309 | 18340 | } |
| 18310 | 18341 | |
| 18311 | 18342 | /* |
| 18312 | 18343 | ** Query status information for a single database connection |
| 18313 | 18344 | */ |
| 18314 | | -SQLITE_API int SQLITE_STDCALL sqlite3_db_status( |
| 18345 | +SQLITE_API int SQLITE_APICALL sqlite3_db_status( |
| 18315 | 18346 | sqlite3 *db, /* The database connection whose status is desired */ |
| 18316 | 18347 | int op, /* Status verb */ |
| 18317 | 18348 | int *pCurrent, /* Write current value here */ |
| 18318 | 18349 | int *pHighwater, /* Write high-water mark here */ |
| 18319 | 18350 | int resetFlag /* Reset high-water mark if true */ |
| | @@ -19987,11 +20018,11 @@ |
| 19987 | 20018 | |
| 19988 | 20019 | /* |
| 19989 | 20020 | ** Locate a VFS by name. If no name is given, simply return the |
| 19990 | 20021 | ** first VFS on the list. |
| 19991 | 20022 | */ |
| 19992 | | -SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfs){ |
| 20023 | +SQLITE_API sqlite3_vfs *SQLITE_APICALL sqlite3_vfs_find(const char *zVfs){ |
| 19993 | 20024 | sqlite3_vfs *pVfs = 0; |
| 19994 | 20025 | #if SQLITE_THREADSAFE |
| 19995 | 20026 | sqlite3_mutex *mutex; |
| 19996 | 20027 | #endif |
| 19997 | 20028 | #ifndef SQLITE_OMIT_AUTOINIT |
| | @@ -20033,11 +20064,11 @@ |
| 20033 | 20064 | /* |
| 20034 | 20065 | ** Register a VFS with the system. It is harmless to register the same |
| 20035 | 20066 | ** VFS multiple times. The new VFS becomes the default if makeDflt is |
| 20036 | 20067 | ** true. |
| 20037 | 20068 | */ |
| 20038 | | -SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){ |
| 20069 | +SQLITE_API int SQLITE_APICALL sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){ |
| 20039 | 20070 | MUTEX_LOGIC(sqlite3_mutex *mutex;) |
| 20040 | 20071 | #ifndef SQLITE_OMIT_AUTOINIT |
| 20041 | 20072 | int rc = sqlite3_initialize(); |
| 20042 | 20073 | if( rc ) return rc; |
| 20043 | 20074 | #endif |
| | @@ -20061,11 +20092,11 @@ |
| 20061 | 20092 | } |
| 20062 | 20093 | |
| 20063 | 20094 | /* |
| 20064 | 20095 | ** Unregister a VFS so that it is no longer accessible. |
| 20065 | 20096 | */ |
| 20066 | | -SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs *pVfs){ |
| 20097 | +SQLITE_API int SQLITE_APICALL sqlite3_vfs_unregister(sqlite3_vfs *pVfs){ |
| 20067 | 20098 | #if SQLITE_THREADSAFE |
| 20068 | 20099 | sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); |
| 20069 | 20100 | #endif |
| 20070 | 20101 | sqlite3_mutex_enter(mutex); |
| 20071 | 20102 | vfsUnlink(pVfs); |
| | @@ -22412,11 +22443,11 @@ |
| 22412 | 22443 | } |
| 22413 | 22444 | |
| 22414 | 22445 | /* |
| 22415 | 22446 | ** Retrieve a pointer to a static mutex or allocate a new dynamic one. |
| 22416 | 22447 | */ |
| 22417 | | -SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int id){ |
| 22448 | +SQLITE_API sqlite3_mutex *SQLITE_APICALL sqlite3_mutex_alloc(int id){ |
| 22418 | 22449 | #ifndef SQLITE_OMIT_AUTOINIT |
| 22419 | 22450 | if( id<=SQLITE_MUTEX_RECURSIVE && sqlite3_initialize() ) return 0; |
| 22420 | 22451 | if( id>SQLITE_MUTEX_RECURSIVE && sqlite3MutexInit() ) return 0; |
| 22421 | 22452 | #endif |
| 22422 | 22453 | assert( sqlite3GlobalConfig.mutex.xMutexAlloc ); |
| | @@ -22433,11 +22464,11 @@ |
| 22433 | 22464 | } |
| 22434 | 22465 | |
| 22435 | 22466 | /* |
| 22436 | 22467 | ** Free a dynamic mutex. |
| 22437 | 22468 | */ |
| 22438 | | -SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex *p){ |
| 22469 | +SQLITE_API void SQLITE_APICALL sqlite3_mutex_free(sqlite3_mutex *p){ |
| 22439 | 22470 | if( p ){ |
| 22440 | 22471 | assert( sqlite3GlobalConfig.mutex.xMutexFree ); |
| 22441 | 22472 | sqlite3GlobalConfig.mutex.xMutexFree(p); |
| 22442 | 22473 | } |
| 22443 | 22474 | } |
| | @@ -22444,11 +22475,11 @@ |
| 22444 | 22475 | |
| 22445 | 22476 | /* |
| 22446 | 22477 | ** Obtain the mutex p. If some other thread already has the mutex, block |
| 22447 | 22478 | ** until it can be obtained. |
| 22448 | 22479 | */ |
| 22449 | | -SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex *p){ |
| 22480 | +SQLITE_API void SQLITE_APICALL sqlite3_mutex_enter(sqlite3_mutex *p){ |
| 22450 | 22481 | if( p ){ |
| 22451 | 22482 | assert( sqlite3GlobalConfig.mutex.xMutexEnter ); |
| 22452 | 22483 | sqlite3GlobalConfig.mutex.xMutexEnter(p); |
| 22453 | 22484 | } |
| 22454 | 22485 | } |
| | @@ -22455,11 +22486,11 @@ |
| 22455 | 22486 | |
| 22456 | 22487 | /* |
| 22457 | 22488 | ** Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another |
| 22458 | 22489 | ** thread holds the mutex and it cannot be obtained, return SQLITE_BUSY. |
| 22459 | 22490 | */ |
| 22460 | | -SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex *p){ |
| 22491 | +SQLITE_API int SQLITE_APICALL sqlite3_mutex_try(sqlite3_mutex *p){ |
| 22461 | 22492 | int rc = SQLITE_OK; |
| 22462 | 22493 | if( p ){ |
| 22463 | 22494 | assert( sqlite3GlobalConfig.mutex.xMutexTry ); |
| 22464 | 22495 | return sqlite3GlobalConfig.mutex.xMutexTry(p); |
| 22465 | 22496 | } |
| | @@ -22470,11 +22501,11 @@ |
| 22470 | 22501 | ** The sqlite3_mutex_leave() routine exits a mutex that was previously |
| 22471 | 22502 | ** entered by the same thread. The behavior is undefined if the mutex |
| 22472 | 22503 | ** is not currently entered. If a NULL pointer is passed as an argument |
| 22473 | 22504 | ** this function is a no-op. |
| 22474 | 22505 | */ |
| 22475 | | -SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex *p){ |
| 22506 | +SQLITE_API void SQLITE_APICALL sqlite3_mutex_leave(sqlite3_mutex *p){ |
| 22476 | 22507 | if( p ){ |
| 22477 | 22508 | assert( sqlite3GlobalConfig.mutex.xMutexLeave ); |
| 22478 | 22509 | sqlite3GlobalConfig.mutex.xMutexLeave(p); |
| 22479 | 22510 | } |
| 22480 | 22511 | } |
| | @@ -22482,15 +22513,15 @@ |
| 22482 | 22513 | #ifndef NDEBUG |
| 22483 | 22514 | /* |
| 22484 | 22515 | ** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are |
| 22485 | 22516 | ** intended for use inside assert() statements. |
| 22486 | 22517 | */ |
| 22487 | | -SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex *p){ |
| 22518 | +SQLITE_API int SQLITE_APICALL sqlite3_mutex_held(sqlite3_mutex *p){ |
| 22488 | 22519 | assert( p==0 || sqlite3GlobalConfig.mutex.xMutexHeld ); |
| 22489 | 22520 | return p==0 || sqlite3GlobalConfig.mutex.xMutexHeld(p); |
| 22490 | 22521 | } |
| 22491 | | -SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex *p){ |
| 22522 | +SQLITE_API int SQLITE_APICALL sqlite3_mutex_notheld(sqlite3_mutex *p){ |
| 22492 | 22523 | assert( p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld ); |
| 22493 | 22524 | return p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld(p); |
| 22494 | 22525 | } |
| 22495 | 22526 | #endif |
| 22496 | 22527 | |
| | @@ -23518,12 +23549,12 @@ |
| 23518 | 23549 | ** of the sqlite3_initialize() and sqlite3_shutdown() processing, the |
| 23519 | 23550 | ** "interlocked" magic used here is probably not strictly necessary. |
| 23520 | 23551 | */ |
| 23521 | 23552 | static LONG SQLITE_WIN32_VOLATILE winMutex_lock = 0; |
| 23522 | 23553 | |
| 23523 | | -SQLITE_API int SQLITE_STDCALL sqlite3_win32_is_nt(void); /* os_win.c */ |
| 23524 | | -SQLITE_API void SQLITE_STDCALL sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */ |
| 23554 | +SQLITE_API int SQLITE_APICALL sqlite3_win32_is_nt(void); /* os_win.c */ |
| 23555 | +SQLITE_API void SQLITE_APICALL sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */ |
| 23525 | 23556 | |
| 23526 | 23557 | static int winMutexInit(void){ |
| 23527 | 23558 | /* The first to increment to 1 does actual initialization */ |
| 23528 | 23559 | if( InterlockedCompareExchange(&winMutex_lock, 1, 0)==0 ){ |
| 23529 | 23560 | int i; |
| | @@ -23819,11 +23850,11 @@ |
| 23819 | 23850 | /* |
| 23820 | 23851 | ** Attempt to release up to n bytes of non-essential memory currently |
| 23821 | 23852 | ** held by SQLite. An example of non-essential memory is memory used to |
| 23822 | 23853 | ** cache database pages that are not currently in use. |
| 23823 | 23854 | */ |
| 23824 | | -SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int n){ |
| 23855 | +SQLITE_API int SQLITE_APICALL sqlite3_release_memory(int n){ |
| 23825 | 23856 | #ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT |
| 23826 | 23857 | return sqlite3PcacheReleaseMemory(n); |
| 23827 | 23858 | #else |
| 23828 | 23859 | /* IMPLEMENTATION-OF: R-34391-24921 The sqlite3_release_memory() routine |
| 23829 | 23860 | ** is a no-op returning zero if SQLite is not compiled with |
| | @@ -23878,11 +23909,11 @@ |
| 23878 | 23909 | /* |
| 23879 | 23910 | ** Deprecated external interface. It used to set an alarm callback |
| 23880 | 23911 | ** that was invoked when memory usage grew too large. Now it is a |
| 23881 | 23912 | ** no-op. |
| 23882 | 23913 | */ |
| 23883 | | -SQLITE_API int SQLITE_STDCALL sqlite3_memory_alarm( |
| 23914 | +SQLITE_API int SQLITE_APICALL sqlite3_memory_alarm( |
| 23884 | 23915 | void(*xCallback)(void *pArg, sqlite3_int64 used,int N), |
| 23885 | 23916 | void *pArg, |
| 23886 | 23917 | sqlite3_int64 iThreshold |
| 23887 | 23918 | ){ |
| 23888 | 23919 | (void)xCallback; |
| | @@ -23894,11 +23925,11 @@ |
| 23894 | 23925 | |
| 23895 | 23926 | /* |
| 23896 | 23927 | ** Set the soft heap-size limit for the library. Passing a zero or |
| 23897 | 23928 | ** negative value indicates no limit. |
| 23898 | 23929 | */ |
| 23899 | | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 n){ |
| 23930 | +SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_soft_heap_limit64(sqlite3_int64 n){ |
| 23900 | 23931 | sqlite3_int64 priorLimit; |
| 23901 | 23932 | sqlite3_int64 excess; |
| 23902 | 23933 | sqlite3_int64 nUsed; |
| 23903 | 23934 | #ifndef SQLITE_OMIT_AUTOINIT |
| 23904 | 23935 | int rc = sqlite3_initialize(); |
| | @@ -23916,11 +23947,11 @@ |
| 23916 | 23947 | sqlite3_mutex_leave(mem0.mutex); |
| 23917 | 23948 | excess = sqlite3_memory_used() - n; |
| 23918 | 23949 | if( excess>0 ) sqlite3_release_memory((int)(excess & 0x7fffffff)); |
| 23919 | 23950 | return priorLimit; |
| 23920 | 23951 | } |
| 23921 | | -SQLITE_API void SQLITE_STDCALL sqlite3_soft_heap_limit(int n){ |
| 23952 | +SQLITE_API void SQLITE_APICALL sqlite3_soft_heap_limit(int n){ |
| 23922 | 23953 | if( n<0 ) n = 0; |
| 23923 | 23954 | sqlite3_soft_heap_limit64(n); |
| 23924 | 23955 | } |
| 23925 | 23956 | |
| 23926 | 23957 | /* |
| | @@ -23985,11 +24016,11 @@ |
| 23985 | 24016 | } |
| 23986 | 24017 | |
| 23987 | 24018 | /* |
| 23988 | 24019 | ** Return the amount of memory currently checked out. |
| 23989 | 24020 | */ |
| 23990 | | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void){ |
| 24021 | +SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_memory_used(void){ |
| 23991 | 24022 | sqlite3_int64 res, mx; |
| 23992 | 24023 | sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, 0); |
| 23993 | 24024 | return res; |
| 23994 | 24025 | } |
| 23995 | 24026 | |
| | @@ -23996,11 +24027,11 @@ |
| 23996 | 24027 | /* |
| 23997 | 24028 | ** Return the maximum amount of memory that has ever been |
| 23998 | 24029 | ** checked out since either the beginning of this process |
| 23999 | 24030 | ** or since the most recent reset. |
| 24000 | 24031 | */ |
| 24001 | | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag){ |
| 24032 | +SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_memory_highwater(int resetFlag){ |
| 24002 | 24033 | sqlite3_int64 res, mx; |
| 24003 | 24034 | sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, resetFlag); |
| 24004 | 24035 | return mx; |
| 24005 | 24036 | } |
| 24006 | 24037 | |
| | @@ -24076,17 +24107,17 @@ |
| 24076 | 24107 | /* |
| 24077 | 24108 | ** This version of the memory allocation is for use by the application. |
| 24078 | 24109 | ** First make sure the memory subsystem is initialized, then do the |
| 24079 | 24110 | ** allocation. |
| 24080 | 24111 | */ |
| 24081 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int n){ |
| 24112 | +SQLITE_API void *SQLITE_APICALL sqlite3_malloc(int n){ |
| 24082 | 24113 | #ifndef SQLITE_OMIT_AUTOINIT |
| 24083 | 24114 | if( sqlite3_initialize() ) return 0; |
| 24084 | 24115 | #endif |
| 24085 | 24116 | return n<=0 ? 0 : sqlite3Malloc(n); |
| 24086 | 24117 | } |
| 24087 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64 n){ |
| 24118 | +SQLITE_API void *SQLITE_APICALL sqlite3_malloc64(sqlite3_uint64 n){ |
| 24088 | 24119 | #ifndef SQLITE_OMIT_AUTOINIT |
| 24089 | 24120 | if( sqlite3_initialize() ) return 0; |
| 24090 | 24121 | #endif |
| 24091 | 24122 | return sqlite3Malloc(n); |
| 24092 | 24123 | } |
| | @@ -24225,20 +24256,20 @@ |
| 24225 | 24256 | }else{ |
| 24226 | 24257 | assert( sqlite3_mutex_held(db->mutex) ); |
| 24227 | 24258 | return db->lookaside.sz; |
| 24228 | 24259 | } |
| 24229 | 24260 | } |
| 24230 | | -SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void *p){ |
| 24261 | +SQLITE_API sqlite3_uint64 SQLITE_APICALL sqlite3_msize(void *p){ |
| 24231 | 24262 | assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) ); |
| 24232 | 24263 | assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) ); |
| 24233 | 24264 | return p ? sqlite3GlobalConfig.m.xSize(p) : 0; |
| 24234 | 24265 | } |
| 24235 | 24266 | |
| 24236 | 24267 | /* |
| 24237 | 24268 | ** Free memory previously obtained from sqlite3Malloc(). |
| 24238 | 24269 | */ |
| 24239 | | -SQLITE_API void SQLITE_STDCALL sqlite3_free(void *p){ |
| 24270 | +SQLITE_API void SQLITE_APICALL sqlite3_free(void *p){ |
| 24240 | 24271 | if( p==0 ) return; /* IMP: R-49053-54554 */ |
| 24241 | 24272 | assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) ); |
| 24242 | 24273 | assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) ); |
| 24243 | 24274 | if( sqlite3GlobalConfig.bMemstat ){ |
| 24244 | 24275 | sqlite3_mutex_enter(mem0.mutex); |
| | @@ -24343,18 +24374,18 @@ |
| 24343 | 24374 | |
| 24344 | 24375 | /* |
| 24345 | 24376 | ** The public interface to sqlite3Realloc. Make sure that the memory |
| 24346 | 24377 | ** subsystem is initialized prior to invoking sqliteRealloc. |
| 24347 | 24378 | */ |
| 24348 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void *pOld, int n){ |
| 24379 | +SQLITE_API void *SQLITE_APICALL sqlite3_realloc(void *pOld, int n){ |
| 24349 | 24380 | #ifndef SQLITE_OMIT_AUTOINIT |
| 24350 | 24381 | if( sqlite3_initialize() ) return 0; |
| 24351 | 24382 | #endif |
| 24352 | 24383 | if( n<0 ) n = 0; /* IMP: R-26507-47431 */ |
| 24353 | 24384 | return sqlite3Realloc(pOld, n); |
| 24354 | 24385 | } |
| 24355 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void *pOld, sqlite3_uint64 n){ |
| 24386 | +SQLITE_API void *SQLITE_APICALL sqlite3_realloc64(void *pOld, sqlite3_uint64 n){ |
| 24356 | 24387 | #ifndef SQLITE_OMIT_AUTOINIT |
| 24357 | 24388 | if( sqlite3_initialize() ) return 0; |
| 24358 | 24389 | #endif |
| 24359 | 24390 | return sqlite3Realloc(pOld, n); |
| 24360 | 24391 | } |
| | @@ -25577,11 +25608,11 @@ |
| 25577 | 25608 | |
| 25578 | 25609 | /* |
| 25579 | 25610 | ** Print into memory obtained from sqlite3_malloc(). Omit the internal |
| 25580 | 25611 | ** %-conversion extensions. |
| 25581 | 25612 | */ |
| 25582 | | -SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char *zFormat, va_list ap){ |
| 25613 | +SQLITE_API char *SQLITE_APICALL sqlite3_vmprintf(const char *zFormat, va_list ap){ |
| 25583 | 25614 | char *z; |
| 25584 | 25615 | char zBase[SQLITE_PRINT_BUF_SIZE]; |
| 25585 | 25616 | StrAccum acc; |
| 25586 | 25617 | |
| 25587 | 25618 | #ifdef SQLITE_ENABLE_API_ARMOR |
| | @@ -25626,11 +25657,11 @@ |
| 25626 | 25657 | ** this without breaking compatibility, so we just have to live with the |
| 25627 | 25658 | ** mistake. |
| 25628 | 25659 | ** |
| 25629 | 25660 | ** sqlite3_vsnprintf() is the varargs version. |
| 25630 | 25661 | */ |
| 25631 | | -SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){ |
| 25662 | +SQLITE_API char *SQLITE_APICALL sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){ |
| 25632 | 25663 | StrAccum acc; |
| 25633 | 25664 | if( n<=0 ) return zBuf; |
| 25634 | 25665 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 25635 | 25666 | if( zBuf==0 || zFormat==0 ) { |
| 25636 | 25667 | (void)SQLITE_MISUSE_BKPT; |
| | @@ -26253,11 +26284,11 @@ |
| 26253 | 26284 | } sqlite3Prng; |
| 26254 | 26285 | |
| 26255 | 26286 | /* |
| 26256 | 26287 | ** Return N random bytes. |
| 26257 | 26288 | */ |
| 26258 | | -SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *pBuf){ |
| 26289 | +SQLITE_API void SQLITE_APICALL sqlite3_randomness(int N, void *pBuf){ |
| 26259 | 26290 | unsigned char t; |
| 26260 | 26291 | unsigned char *zBuf = pBuf; |
| 26261 | 26292 | |
| 26262 | 26293 | /* The "wsdPrng" macro will resolve to the pseudo-random number generator |
| 26263 | 26294 | ** state vector. If writable static data is unsupported on the target, |
| | @@ -27456,11 +27487,11 @@ |
| 27456 | 27487 | ** sqlite3_strnicmp() APIs allow applications and extensions to compare |
| 27457 | 27488 | ** the contents of two buffers containing UTF-8 strings in a |
| 27458 | 27489 | ** case-independent fashion, using the same definition of "case |
| 27459 | 27490 | ** independence" that SQLite uses internally when comparing identifiers. |
| 27460 | 27491 | */ |
| 27461 | | -SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *zLeft, const char *zRight){ |
| 27492 | +SQLITE_API int SQLITE_APICALL sqlite3_stricmp(const char *zLeft, const char *zRight){ |
| 27462 | 27493 | if( zLeft==0 ){ |
| 27463 | 27494 | return zRight ? -1 : 0; |
| 27464 | 27495 | }else if( zRight==0 ){ |
| 27465 | 27496 | return 1; |
| 27466 | 27497 | } |
| | @@ -27477,11 +27508,11 @@ |
| 27477 | 27508 | a++; |
| 27478 | 27509 | b++; |
| 27479 | 27510 | } |
| 27480 | 27511 | return c; |
| 27481 | 27512 | } |
| 27482 | | -SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){ |
| 27513 | +SQLITE_API int SQLITE_APICALL sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){ |
| 27483 | 27514 | register unsigned char *a, *b; |
| 27484 | 27515 | if( zLeft==0 ){ |
| 27485 | 27516 | return zRight ? -1 : 0; |
| 27486 | 27517 | }else if( zRight==0 ){ |
| 27487 | 27518 | return 1; |
| | @@ -36776,11 +36807,11 @@ |
| 36776 | 36807 | ** This routine is called once during SQLite initialization and by a |
| 36777 | 36808 | ** single thread. The memory allocation and mutex subsystems have not |
| 36778 | 36809 | ** necessarily been initialized when this routine is called, and so they |
| 36779 | 36810 | ** should not be used. |
| 36780 | 36811 | */ |
| 36781 | | -SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){ |
| 36812 | +SQLITE_API int SQLITE_APICALL sqlite3_os_init(void){ |
| 36782 | 36813 | /* |
| 36783 | 36814 | ** The following macro defines an initializer for an sqlite3_vfs object. |
| 36784 | 36815 | ** The name of the VFS is NAME. The pAppData is a pointer to a pointer |
| 36785 | 36816 | ** to the "finder" function. (pAppData is a pointer to a pointer because |
| 36786 | 36817 | ** silly C90 rules prohibit a void* from being cast to a function pointer |
| | @@ -36875,11 +36906,11 @@ |
| 36875 | 36906 | ** |
| 36876 | 36907 | ** Some operating systems might need to do some cleanup in this routine, |
| 36877 | 36908 | ** to release dynamically allocated objects. But not on unix. |
| 36878 | 36909 | ** This routine is a no-op for unix. |
| 36879 | 36910 | */ |
| 36880 | | -SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){ |
| 36911 | +SQLITE_API int SQLITE_APICALL sqlite3_os_end(void){ |
| 36881 | 36912 | return SQLITE_OK; |
| 36882 | 36913 | } |
| 36883 | 36914 | |
| 36884 | 36915 | #endif /* SQLITE_OS_UNIX */ |
| 36885 | 36916 | |
| | @@ -38310,11 +38341,11 @@ |
| 38310 | 38341 | ** compact it. Upon success, SQLITE_OK will be returned. Upon failure, one |
| 38311 | 38342 | ** of SQLITE_NOMEM, SQLITE_ERROR, or SQLITE_NOTFOUND will be returned. The |
| 38312 | 38343 | ** "pnLargest" argument, if non-zero, will be used to return the size of the |
| 38313 | 38344 | ** largest committed free block in the heap, in bytes. |
| 38314 | 38345 | */ |
| 38315 | | -SQLITE_API int SQLITE_STDCALL sqlite3_win32_compact_heap(LPUINT pnLargest){ |
| 38346 | +SQLITE_API int SQLITE_APICALL sqlite3_win32_compact_heap(LPUINT pnLargest){ |
| 38316 | 38347 | int rc = SQLITE_OK; |
| 38317 | 38348 | UINT nLargest = 0; |
| 38318 | 38349 | HANDLE hHeap; |
| 38319 | 38350 | |
| 38320 | 38351 | winMemAssertMagic(); |
| | @@ -38350,11 +38381,11 @@ |
| 38350 | 38381 | ** If a Win32 native heap has been configured, this function will attempt to |
| 38351 | 38382 | ** destroy and recreate it. If the Win32 native heap is not isolated and/or |
| 38352 | 38383 | ** the sqlite3_memory_used() function does not return zero, SQLITE_BUSY will |
| 38353 | 38384 | ** be returned and no changes will be made to the Win32 native heap. |
| 38354 | 38385 | */ |
| 38355 | | -SQLITE_API int SQLITE_STDCALL sqlite3_win32_reset_heap(){ |
| 38386 | +SQLITE_API int SQLITE_APICALL sqlite3_win32_reset_heap(){ |
| 38356 | 38387 | int rc; |
| 38357 | 38388 | MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */ |
| 38358 | 38389 | MUTEX_LOGIC( sqlite3_mutex *pMem; ) /* The memsys static mutex */ |
| 38359 | 38390 | MUTEX_LOGIC( pMaster = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); ) |
| 38360 | 38391 | MUTEX_LOGIC( pMem = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM); ) |
| | @@ -38395,11 +38426,11 @@ |
| 38395 | 38426 | /* |
| 38396 | 38427 | ** This function outputs the specified (ANSI) string to the Win32 debugger |
| 38397 | 38428 | ** (if available). |
| 38398 | 38429 | */ |
| 38399 | 38430 | |
| 38400 | | -SQLITE_API void SQLITE_STDCALL sqlite3_win32_write_debug(const char *zBuf, int nBuf){ |
| 38431 | +SQLITE_API void SQLITE_APICALL sqlite3_win32_write_debug(const char *zBuf, int nBuf){ |
| 38401 | 38432 | char zDbgBuf[SQLITE_WIN32_DBG_BUF_SIZE]; |
| 38402 | 38433 | int nMin = MIN(nBuf, (SQLITE_WIN32_DBG_BUF_SIZE - 1)); /* may be negative. */ |
| 38403 | 38434 | if( nMin<-1 ) nMin = -1; /* all negative values become -1. */ |
| 38404 | 38435 | assert( nMin==-1 || nMin==0 || nMin<SQLITE_WIN32_DBG_BUF_SIZE ); |
| 38405 | 38436 | #ifdef SQLITE_ENABLE_API_ARMOR |
| | @@ -38441,11 +38472,11 @@ |
| 38441 | 38472 | */ |
| 38442 | 38473 | #if SQLITE_OS_WINRT |
| 38443 | 38474 | static HANDLE sleepObj = NULL; |
| 38444 | 38475 | #endif |
| 38445 | 38476 | |
| 38446 | | -SQLITE_API void SQLITE_STDCALL sqlite3_win32_sleep(DWORD milliseconds){ |
| 38477 | +SQLITE_API void SQLITE_APICALL sqlite3_win32_sleep(DWORD milliseconds){ |
| 38447 | 38478 | #if SQLITE_OS_WINRT |
| 38448 | 38479 | if ( sleepObj==NULL ){ |
| 38449 | 38480 | sleepObj = osCreateEventExW(NULL, NULL, CREATE_EVENT_MANUAL_RESET, |
| 38450 | 38481 | SYNCHRONIZE); |
| 38451 | 38482 | } |
| | @@ -38490,11 +38521,11 @@ |
| 38490 | 38521 | |
| 38491 | 38522 | /* |
| 38492 | 38523 | ** This function determines if the machine is running a version of Windows |
| 38493 | 38524 | ** based on the NT kernel. |
| 38494 | 38525 | */ |
| 38495 | | -SQLITE_API int SQLITE_STDCALL sqlite3_win32_is_nt(void){ |
| 38526 | +SQLITE_API int SQLITE_APICALL sqlite3_win32_is_nt(void){ |
| 38496 | 38527 | #if SQLITE_OS_WINRT |
| 38497 | 38528 | /* |
| 38498 | 38529 | ** NOTE: The WinRT sub-platform is always assumed to be based on the NT |
| 38499 | 38530 | ** kernel. |
| 38500 | 38531 | */ |
| | @@ -38878,11 +38909,11 @@ |
| 38878 | 38909 | } |
| 38879 | 38910 | |
| 38880 | 38911 | /* |
| 38881 | 38912 | ** This is a public wrapper for the winUtf8ToUnicode() function. |
| 38882 | 38913 | */ |
| 38883 | | -SQLITE_API LPWSTR SQLITE_STDCALL sqlite3_win32_utf8_to_unicode(const char *zText){ |
| 38914 | +SQLITE_API LPWSTR SQLITE_APICALL sqlite3_win32_utf8_to_unicode(const char *zText){ |
| 38884 | 38915 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38885 | 38916 | if( !zText ){ |
| 38886 | 38917 | (void)SQLITE_MISUSE_BKPT; |
| 38887 | 38918 | return 0; |
| 38888 | 38919 | } |
| | @@ -38894,11 +38925,11 @@ |
| 38894 | 38925 | } |
| 38895 | 38926 | |
| 38896 | 38927 | /* |
| 38897 | 38928 | ** This is a public wrapper for the winUnicodeToUtf8() function. |
| 38898 | 38929 | */ |
| 38899 | | -SQLITE_API char *SQLITE_STDCALL sqlite3_win32_unicode_to_utf8(LPCWSTR zWideText){ |
| 38930 | +SQLITE_API char *SQLITE_APICALL sqlite3_win32_unicode_to_utf8(LPCWSTR zWideText){ |
| 38900 | 38931 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38901 | 38932 | if( !zWideText ){ |
| 38902 | 38933 | (void)SQLITE_MISUSE_BKPT; |
| 38903 | 38934 | return 0; |
| 38904 | 38935 | } |
| | @@ -38910,11 +38941,11 @@ |
| 38910 | 38941 | } |
| 38911 | 38942 | |
| 38912 | 38943 | /* |
| 38913 | 38944 | ** This is a public wrapper for the winMbcsToUtf8() function. |
| 38914 | 38945 | */ |
| 38915 | | -SQLITE_API char *SQLITE_STDCALL sqlite3_win32_mbcs_to_utf8(const char *zText){ |
| 38946 | +SQLITE_API char *SQLITE_APICALL sqlite3_win32_mbcs_to_utf8(const char *zText){ |
| 38916 | 38947 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38917 | 38948 | if( !zText ){ |
| 38918 | 38949 | (void)SQLITE_MISUSE_BKPT; |
| 38919 | 38950 | return 0; |
| 38920 | 38951 | } |
| | @@ -38926,11 +38957,11 @@ |
| 38926 | 38957 | } |
| 38927 | 38958 | |
| 38928 | 38959 | /* |
| 38929 | 38960 | ** This is a public wrapper for the winMbcsToUtf8() function. |
| 38930 | 38961 | */ |
| 38931 | | -SQLITE_API char *SQLITE_STDCALL sqlite3_win32_mbcs_to_utf8_v2(const char *zText, int useAnsi){ |
| 38962 | +SQLITE_API char *SQLITE_APICALL sqlite3_win32_mbcs_to_utf8_v2(const char *zText, int useAnsi){ |
| 38932 | 38963 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38933 | 38964 | if( !zText ){ |
| 38934 | 38965 | (void)SQLITE_MISUSE_BKPT; |
| 38935 | 38966 | return 0; |
| 38936 | 38967 | } |
| | @@ -38942,11 +38973,11 @@ |
| 38942 | 38973 | } |
| 38943 | 38974 | |
| 38944 | 38975 | /* |
| 38945 | 38976 | ** This is a public wrapper for the winUtf8ToMbcs() function. |
| 38946 | 38977 | */ |
| 38947 | | -SQLITE_API char *SQLITE_STDCALL sqlite3_win32_utf8_to_mbcs(const char *zText){ |
| 38978 | +SQLITE_API char *SQLITE_APICALL sqlite3_win32_utf8_to_mbcs(const char *zText){ |
| 38948 | 38979 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38949 | 38980 | if( !zText ){ |
| 38950 | 38981 | (void)SQLITE_MISUSE_BKPT; |
| 38951 | 38982 | return 0; |
| 38952 | 38983 | } |
| | @@ -38958,11 +38989,11 @@ |
| 38958 | 38989 | } |
| 38959 | 38990 | |
| 38960 | 38991 | /* |
| 38961 | 38992 | ** This is a public wrapper for the winUtf8ToMbcs() function. |
| 38962 | 38993 | */ |
| 38963 | | -SQLITE_API char *SQLITE_STDCALL sqlite3_win32_utf8_to_mbcs_v2(const char *zText, int useAnsi){ |
| 38994 | +SQLITE_API char *SQLITE_APICALL sqlite3_win32_utf8_to_mbcs_v2(const char *zText, int useAnsi){ |
| 38964 | 38995 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 38965 | 38996 | if( !zText ){ |
| 38966 | 38997 | (void)SQLITE_MISUSE_BKPT; |
| 38967 | 38998 | return 0; |
| 38968 | 38999 | } |
| | @@ -38978,11 +39009,11 @@ |
| 38978 | 39009 | ** the provided arguments. The type argument must be 1 in order to set the |
| 38979 | 39010 | ** data directory or 2 in order to set the temporary directory. The zValue |
| 38980 | 39011 | ** argument is the name of the directory to use. The return value will be |
| 38981 | 39012 | ** SQLITE_OK if successful. |
| 38982 | 39013 | */ |
| 38983 | | -SQLITE_API int SQLITE_STDCALL sqlite3_win32_set_directory(DWORD type, LPCWSTR zValue){ |
| 39014 | +SQLITE_API int SQLITE_APICALL sqlite3_win32_set_directory(DWORD type, LPCWSTR zValue){ |
| 38984 | 39015 | char **ppDirectory = 0; |
| 38985 | 39016 | #ifndef SQLITE_OMIT_AUTOINIT |
| 38986 | 39017 | int rc = sqlite3_initialize(); |
| 38987 | 39018 | if( rc ) return rc; |
| 38988 | 39019 | #endif |
| | @@ -42896,11 +42927,11 @@ |
| 42896 | 42927 | } |
| 42897 | 42928 | |
| 42898 | 42929 | /* |
| 42899 | 42930 | ** Initialize and deinitialize the operating system interface. |
| 42900 | 42931 | */ |
| 42901 | | -SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){ |
| 42932 | +SQLITE_API int SQLITE_APICALL sqlite3_os_init(void){ |
| 42902 | 42933 | static sqlite3_vfs winVfs = { |
| 42903 | 42934 | 3, /* iVersion */ |
| 42904 | 42935 | sizeof(winFile), /* szOsFile */ |
| 42905 | 42936 | SQLITE_WIN32_MAX_PATH_BYTES, /* mxPathname */ |
| 42906 | 42937 | 0, /* pNext */ |
| | @@ -43027,11 +43058,11 @@ |
| 43027 | 43058 | #endif |
| 43028 | 43059 | |
| 43029 | 43060 | return SQLITE_OK; |
| 43030 | 43061 | } |
| 43031 | 43062 | |
| 43032 | | -SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){ |
| 43063 | +SQLITE_API int SQLITE_APICALL sqlite3_os_end(void){ |
| 43033 | 43064 | #if SQLITE_OS_WINRT |
| 43034 | 43065 | if( sleepObj!=NULL ){ |
| 43035 | 43066 | osCloseHandle(sleepObj); |
| 43036 | 43067 | sleepObj = NULL; |
| 43037 | 43068 | } |
| | @@ -57022,11 +57053,11 @@ |
| 57022 | 57053 | |
| 57023 | 57054 | /* |
| 57024 | 57055 | ** Return a +ve value if snapshot p1 is newer than p2. A -ve value if |
| 57025 | 57056 | ** p1 is older than p2 and zero if p1 and p2 are the same snapshot. |
| 57026 | 57057 | */ |
| 57027 | | -SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_cmp(sqlite3_snapshot *p1, sqlite3_snapshot *p2){ |
| 57058 | +SQLITE_API int SQLITE_APICALL sqlite3_snapshot_cmp(sqlite3_snapshot *p1, sqlite3_snapshot *p2){ |
| 57028 | 57059 | WalIndexHdr *pHdr1 = (WalIndexHdr*)p1; |
| 57029 | 57060 | WalIndexHdr *pHdr2 = (WalIndexHdr*)p2; |
| 57030 | 57061 | |
| 57031 | 57062 | /* aSalt[0] is a copy of the value stored in the wal file header. It |
| 57032 | 57063 | ** is incremented each time the wal file is restarted. */ |
| | @@ -58159,11 +58190,11 @@ |
| 58159 | 58190 | ** |
| 58160 | 58191 | ** This routine has no effect on existing database connections. |
| 58161 | 58192 | ** The shared cache setting effects only future calls to |
| 58162 | 58193 | ** sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2(). |
| 58163 | 58194 | */ |
| 58164 | | -SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int enable){ |
| 58195 | +SQLITE_API int SQLITE_APICALL sqlite3_enable_shared_cache(int enable){ |
| 58165 | 58196 | sqlite3GlobalConfig.sharedCacheEnabled = enable; |
| 58166 | 58197 | return SQLITE_OK; |
| 58167 | 58198 | } |
| 58168 | 58199 | #endif |
| 58169 | 58200 | |
| | @@ -67932,11 +67963,11 @@ |
| 67932 | 67963 | ** a pointer to the new sqlite3_backup object. |
| 67933 | 67964 | ** |
| 67934 | 67965 | ** If an error occurs, NULL is returned and an error code and error message |
| 67935 | 67966 | ** stored in database handle pDestDb. |
| 67936 | 67967 | */ |
| 67937 | | -SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init( |
| 67968 | +SQLITE_API sqlite3_backup *SQLITE_APICALL sqlite3_backup_init( |
| 67938 | 67969 | sqlite3* pDestDb, /* Database to write to */ |
| 67939 | 67970 | const char *zDestDb, /* Name of database within pDestDb */ |
| 67940 | 67971 | sqlite3* pSrcDb, /* Database connection to read from */ |
| 67941 | 67972 | const char *zSrcDb /* Name of database within pSrcDb */ |
| 67942 | 67973 | ){ |
| | @@ -68140,11 +68171,11 @@ |
| 68140 | 68171 | } |
| 68141 | 68172 | |
| 68142 | 68173 | /* |
| 68143 | 68174 | ** Copy nPage pages from the source b-tree to the destination. |
| 68144 | 68175 | */ |
| 68145 | | -SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage){ |
| 68176 | +SQLITE_API int SQLITE_APICALL sqlite3_backup_step(sqlite3_backup *p, int nPage){ |
| 68146 | 68177 | int rc; |
| 68147 | 68178 | int destMode; /* Destination journal mode */ |
| 68148 | 68179 | int pgszSrc = 0; /* Source page size */ |
| 68149 | 68180 | int pgszDest = 0; /* Destination page size */ |
| 68150 | 68181 | |
| | @@ -68384,11 +68415,11 @@ |
| 68384 | 68415 | } |
| 68385 | 68416 | |
| 68386 | 68417 | /* |
| 68387 | 68418 | ** Release all resources associated with an sqlite3_backup* handle. |
| 68388 | 68419 | */ |
| 68389 | | -SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p){ |
| 68420 | +SQLITE_API int SQLITE_APICALL sqlite3_backup_finish(sqlite3_backup *p){ |
| 68390 | 68421 | sqlite3_backup **pp; /* Ptr to head of pagers backup list */ |
| 68391 | 68422 | sqlite3 *pSrcDb; /* Source database connection */ |
| 68392 | 68423 | int rc; /* Value to return */ |
| 68393 | 68424 | |
| 68394 | 68425 | /* Enter the mutexes */ |
| | @@ -68436,11 +68467,11 @@ |
| 68436 | 68467 | |
| 68437 | 68468 | /* |
| 68438 | 68469 | ** Return the number of pages still to be backed up as of the most recent |
| 68439 | 68470 | ** call to sqlite3_backup_step(). |
| 68440 | 68471 | */ |
| 68441 | | -SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p){ |
| 68472 | +SQLITE_API int SQLITE_APICALL sqlite3_backup_remaining(sqlite3_backup *p){ |
| 68442 | 68473 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 68443 | 68474 | if( p==0 ){ |
| 68444 | 68475 | (void)SQLITE_MISUSE_BKPT; |
| 68445 | 68476 | return 0; |
| 68446 | 68477 | } |
| | @@ -68450,11 +68481,11 @@ |
| 68450 | 68481 | |
| 68451 | 68482 | /* |
| 68452 | 68483 | ** Return the total number of pages in the source database as of the most |
| 68453 | 68484 | ** recent call to sqlite3_backup_step(). |
| 68454 | 68485 | */ |
| 68455 | | -SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p){ |
| 68486 | +SQLITE_API int SQLITE_APICALL sqlite3_backup_pagecount(sqlite3_backup *p){ |
| 68456 | 68487 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 68457 | 68488 | if( p==0 ){ |
| 68458 | 68489 | (void)SQLITE_MISUSE_BKPT; |
| 68459 | 68490 | return 0; |
| 68460 | 68491 | } |
| | @@ -74904,11 +74935,11 @@ |
| 74904 | 74935 | ** execution environment changes in a way that would alter the program |
| 74905 | 74936 | ** that sqlite3_prepare() generates. For example, if new functions or |
| 74906 | 74937 | ** collating sequences are registered or if an authorizer function is |
| 74907 | 74938 | ** added or changed. |
| 74908 | 74939 | */ |
| 74909 | | -SQLITE_API int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt *pStmt){ |
| 74940 | +SQLITE_API int SQLITE_APICALL sqlite3_expired(sqlite3_stmt *pStmt){ |
| 74910 | 74941 | Vdbe *p = (Vdbe*)pStmt; |
| 74911 | 74942 | return p==0 || p->expired; |
| 74912 | 74943 | } |
| 74913 | 74944 | #endif |
| 74914 | 74945 | |
| | @@ -74973,11 +75004,11 @@ |
| 74973 | 75004 | ** machine. |
| 74974 | 75005 | ** |
| 74975 | 75006 | ** This routine sets the error code and string returned by |
| 74976 | 75007 | ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). |
| 74977 | 75008 | */ |
| 74978 | | -SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt){ |
| 75009 | +SQLITE_API int SQLITE_APICALL sqlite3_finalize(sqlite3_stmt *pStmt){ |
| 74979 | 75010 | int rc; |
| 74980 | 75011 | if( pStmt==0 ){ |
| 74981 | 75012 | /* IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL |
| 74982 | 75013 | ** pointer is a harmless no-op. */ |
| 74983 | 75014 | rc = SQLITE_OK; |
| | @@ -75000,11 +75031,11 @@ |
| 75000 | 75031 | ** the prior execution is returned. |
| 75001 | 75032 | ** |
| 75002 | 75033 | ** This routine sets the error code and string returned by |
| 75003 | 75034 | ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). |
| 75004 | 75035 | */ |
| 75005 | | -SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt){ |
| 75036 | +SQLITE_API int SQLITE_APICALL sqlite3_reset(sqlite3_stmt *pStmt){ |
| 75006 | 75037 | int rc; |
| 75007 | 75038 | if( pStmt==0 ){ |
| 75008 | 75039 | rc = SQLITE_OK; |
| 75009 | 75040 | }else{ |
| 75010 | 75041 | Vdbe *v = (Vdbe*)pStmt; |
| | @@ -75021,11 +75052,11 @@ |
| 75021 | 75052 | } |
| 75022 | 75053 | |
| 75023 | 75054 | /* |
| 75024 | 75055 | ** Set all the parameters in the compiled SQL statement to NULL. |
| 75025 | 75056 | */ |
| 75026 | | -SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt *pStmt){ |
| 75057 | +SQLITE_API int SQLITE_APICALL sqlite3_clear_bindings(sqlite3_stmt *pStmt){ |
| 75027 | 75058 | int i; |
| 75028 | 75059 | int rc = SQLITE_OK; |
| 75029 | 75060 | Vdbe *p = (Vdbe*)pStmt; |
| 75030 | 75061 | #if SQLITE_THREADSAFE |
| 75031 | 75062 | sqlite3_mutex *mutex = ((Vdbe*)pStmt)->db->mutex; |
| | @@ -75045,11 +75076,11 @@ |
| 75045 | 75076 | |
| 75046 | 75077 | /**************************** sqlite3_value_ ******************************* |
| 75047 | 75078 | ** The following routines extract information from a Mem or sqlite3_value |
| 75048 | 75079 | ** structure. |
| 75049 | 75080 | */ |
| 75050 | | -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value *pVal){ |
| 75081 | +SQLITE_API const void *SQLITE_APICALL sqlite3_value_blob(sqlite3_value *pVal){ |
| 75051 | 75082 | Mem *p = (Mem*)pVal; |
| 75052 | 75083 | if( p->flags & (MEM_Blob|MEM_Str) ){ |
| 75053 | 75084 | if( sqlite3VdbeMemExpandBlob(p)!=SQLITE_OK ){ |
| 75054 | 75085 | assert( p->flags==MEM_Null && p->z==0 ); |
| 75055 | 75086 | return 0; |
| | @@ -75058,48 +75089,48 @@ |
| 75058 | 75089 | return p->n ? p->z : 0; |
| 75059 | 75090 | }else{ |
| 75060 | 75091 | return sqlite3_value_text(pVal); |
| 75061 | 75092 | } |
| 75062 | 75093 | } |
| 75063 | | -SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value *pVal){ |
| 75094 | +SQLITE_API int SQLITE_APICALL sqlite3_value_bytes(sqlite3_value *pVal){ |
| 75064 | 75095 | return sqlite3ValueBytes(pVal, SQLITE_UTF8); |
| 75065 | 75096 | } |
| 75066 | | -SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value *pVal){ |
| 75097 | +SQLITE_API int SQLITE_APICALL sqlite3_value_bytes16(sqlite3_value *pVal){ |
| 75067 | 75098 | return sqlite3ValueBytes(pVal, SQLITE_UTF16NATIVE); |
| 75068 | 75099 | } |
| 75069 | | -SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value *pVal){ |
| 75100 | +SQLITE_API double SQLITE_APICALL sqlite3_value_double(sqlite3_value *pVal){ |
| 75070 | 75101 | return sqlite3VdbeRealValue((Mem*)pVal); |
| 75071 | 75102 | } |
| 75072 | | -SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value *pVal){ |
| 75103 | +SQLITE_API int SQLITE_APICALL sqlite3_value_int(sqlite3_value *pVal){ |
| 75073 | 75104 | return (int)sqlite3VdbeIntValue((Mem*)pVal); |
| 75074 | 75105 | } |
| 75075 | | -SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value *pVal){ |
| 75106 | +SQLITE_API sqlite_int64 SQLITE_APICALL sqlite3_value_int64(sqlite3_value *pVal){ |
| 75076 | 75107 | return sqlite3VdbeIntValue((Mem*)pVal); |
| 75077 | 75108 | } |
| 75078 | | -SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value *pVal){ |
| 75109 | +SQLITE_API unsigned int SQLITE_APICALL sqlite3_value_subtype(sqlite3_value *pVal){ |
| 75079 | 75110 | Mem *pMem = (Mem*)pVal; |
| 75080 | 75111 | return ((pMem->flags & MEM_Subtype) ? pMem->eSubtype : 0); |
| 75081 | 75112 | } |
| 75082 | | -SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value *pVal){ |
| 75113 | +SQLITE_API const unsigned char *SQLITE_APICALL sqlite3_value_text(sqlite3_value *pVal){ |
| 75083 | 75114 | return (const unsigned char *)sqlite3ValueText(pVal, SQLITE_UTF8); |
| 75084 | 75115 | } |
| 75085 | 75116 | #ifndef SQLITE_OMIT_UTF16 |
| 75086 | | -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value* pVal){ |
| 75117 | +SQLITE_API const void *SQLITE_APICALL sqlite3_value_text16(sqlite3_value* pVal){ |
| 75087 | 75118 | return sqlite3ValueText(pVal, SQLITE_UTF16NATIVE); |
| 75088 | 75119 | } |
| 75089 | | -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value *pVal){ |
| 75120 | +SQLITE_API const void *SQLITE_APICALL sqlite3_value_text16be(sqlite3_value *pVal){ |
| 75090 | 75121 | return sqlite3ValueText(pVal, SQLITE_UTF16BE); |
| 75091 | 75122 | } |
| 75092 | | -SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value *pVal){ |
| 75123 | +SQLITE_API const void *SQLITE_APICALL sqlite3_value_text16le(sqlite3_value *pVal){ |
| 75093 | 75124 | return sqlite3ValueText(pVal, SQLITE_UTF16LE); |
| 75094 | 75125 | } |
| 75095 | 75126 | #endif /* SQLITE_OMIT_UTF16 */ |
| 75096 | 75127 | /* EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five |
| 75097 | 75128 | ** fundamental datatypes: 64-bit signed integer 64-bit IEEE floating |
| 75098 | 75129 | ** point number string BLOB NULL |
| 75099 | 75130 | */ |
| 75100 | | -SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value* pVal){ |
| 75131 | +SQLITE_API int SQLITE_APICALL sqlite3_value_type(sqlite3_value* pVal){ |
| 75101 | 75132 | static const u8 aType[] = { |
| 75102 | 75133 | SQLITE_BLOB, /* 0x00 */ |
| 75103 | 75134 | SQLITE_NULL, /* 0x01 */ |
| 75104 | 75135 | SQLITE_TEXT, /* 0x02 */ |
| 75105 | 75136 | SQLITE_NULL, /* 0x03 */ |
| | @@ -75135,11 +75166,11 @@ |
| 75135 | 75166 | return aType[pVal->flags&MEM_AffMask]; |
| 75136 | 75167 | } |
| 75137 | 75168 | |
| 75138 | 75169 | /* Make a copy of an sqlite3_value object |
| 75139 | 75170 | */ |
| 75140 | | -SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value *pOrig){ |
| 75171 | +SQLITE_API sqlite3_value *SQLITE_APICALL sqlite3_value_dup(const sqlite3_value *pOrig){ |
| 75141 | 75172 | sqlite3_value *pNew; |
| 75142 | 75173 | if( pOrig==0 ) return 0; |
| 75143 | 75174 | pNew = sqlite3_malloc( sizeof(*pNew) ); |
| 75144 | 75175 | if( pNew==0 ) return 0; |
| 75145 | 75176 | memset(pNew, 0, sizeof(*pNew)); |
| | @@ -75158,11 +75189,11 @@ |
| 75158 | 75189 | } |
| 75159 | 75190 | |
| 75160 | 75191 | /* Destroy an sqlite3_value object previously obtained from |
| 75161 | 75192 | ** sqlite3_value_dup(). |
| 75162 | 75193 | */ |
| 75163 | | -SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value *pOld){ |
| 75194 | +SQLITE_API void SQLITE_APICALL sqlite3_value_free(sqlite3_value *pOld){ |
| 75164 | 75195 | sqlite3ValueFree(pOld); |
| 75165 | 75196 | } |
| 75166 | 75197 | |
| 75167 | 75198 | |
| 75168 | 75199 | /**************************** sqlite3_result_ ******************************* |
| | @@ -75201,21 +75232,21 @@ |
| 75201 | 75232 | xDel((void*)p); |
| 75202 | 75233 | } |
| 75203 | 75234 | if( pCtx ) sqlite3_result_error_toobig(pCtx); |
| 75204 | 75235 | return SQLITE_TOOBIG; |
| 75205 | 75236 | } |
| 75206 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_blob( |
| 75237 | +SQLITE_API void SQLITE_APICALL sqlite3_result_blob( |
| 75207 | 75238 | sqlite3_context *pCtx, |
| 75208 | 75239 | const void *z, |
| 75209 | 75240 | int n, |
| 75210 | 75241 | void (*xDel)(void *) |
| 75211 | 75242 | ){ |
| 75212 | 75243 | assert( n>=0 ); |
| 75213 | 75244 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75214 | 75245 | setResultStrOrError(pCtx, z, n, 0, xDel); |
| 75215 | 75246 | } |
| 75216 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64( |
| 75247 | +SQLITE_API void SQLITE_APICALL sqlite3_result_blob64( |
| 75217 | 75248 | sqlite3_context *pCtx, |
| 75218 | 75249 | const void *z, |
| 75219 | 75250 | sqlite3_uint64 n, |
| 75220 | 75251 | void (*xDel)(void *) |
| 75221 | 75252 | ){ |
| | @@ -75225,56 +75256,56 @@ |
| 75225 | 75256 | (void)invokeValueDestructor(z, xDel, pCtx); |
| 75226 | 75257 | }else{ |
| 75227 | 75258 | setResultStrOrError(pCtx, z, (int)n, 0, xDel); |
| 75228 | 75259 | } |
| 75229 | 75260 | } |
| 75230 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context *pCtx, double rVal){ |
| 75261 | +SQLITE_API void SQLITE_APICALL sqlite3_result_double(sqlite3_context *pCtx, double rVal){ |
| 75231 | 75262 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75232 | 75263 | sqlite3VdbeMemSetDouble(pCtx->pOut, rVal); |
| 75233 | 75264 | } |
| 75234 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){ |
| 75265 | +SQLITE_API void SQLITE_APICALL sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){ |
| 75235 | 75266 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75236 | 75267 | pCtx->isError = SQLITE_ERROR; |
| 75237 | 75268 | pCtx->fErrorOrAux = 1; |
| 75238 | 75269 | sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF8, SQLITE_TRANSIENT); |
| 75239 | 75270 | } |
| 75240 | 75271 | #ifndef SQLITE_OMIT_UTF16 |
| 75241 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){ |
| 75272 | +SQLITE_API void SQLITE_APICALL sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){ |
| 75242 | 75273 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75243 | 75274 | pCtx->isError = SQLITE_ERROR; |
| 75244 | 75275 | pCtx->fErrorOrAux = 1; |
| 75245 | 75276 | sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT); |
| 75246 | 75277 | } |
| 75247 | 75278 | #endif |
| 75248 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context *pCtx, int iVal){ |
| 75279 | +SQLITE_API void SQLITE_APICALL sqlite3_result_int(sqlite3_context *pCtx, int iVal){ |
| 75249 | 75280 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75250 | 75281 | sqlite3VdbeMemSetInt64(pCtx->pOut, (i64)iVal); |
| 75251 | 75282 | } |
| 75252 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context *pCtx, i64 iVal){ |
| 75283 | +SQLITE_API void SQLITE_APICALL sqlite3_result_int64(sqlite3_context *pCtx, i64 iVal){ |
| 75253 | 75284 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75254 | 75285 | sqlite3VdbeMemSetInt64(pCtx->pOut, iVal); |
| 75255 | 75286 | } |
| 75256 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context *pCtx){ |
| 75287 | +SQLITE_API void SQLITE_APICALL sqlite3_result_null(sqlite3_context *pCtx){ |
| 75257 | 75288 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75258 | 75289 | sqlite3VdbeMemSetNull(pCtx->pOut); |
| 75259 | 75290 | } |
| 75260 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context *pCtx, unsigned int eSubtype){ |
| 75291 | +SQLITE_API void SQLITE_APICALL sqlite3_result_subtype(sqlite3_context *pCtx, unsigned int eSubtype){ |
| 75261 | 75292 | Mem *pOut = pCtx->pOut; |
| 75262 | 75293 | assert( sqlite3_mutex_held(pOut->db->mutex) ); |
| 75263 | 75294 | pOut->eSubtype = eSubtype & 0xff; |
| 75264 | 75295 | pOut->flags |= MEM_Subtype; |
| 75265 | 75296 | } |
| 75266 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_text( |
| 75297 | +SQLITE_API void SQLITE_APICALL sqlite3_result_text( |
| 75267 | 75298 | sqlite3_context *pCtx, |
| 75268 | 75299 | const char *z, |
| 75269 | 75300 | int n, |
| 75270 | 75301 | void (*xDel)(void *) |
| 75271 | 75302 | ){ |
| 75272 | 75303 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75273 | 75304 | setResultStrOrError(pCtx, z, n, SQLITE_UTF8, xDel); |
| 75274 | 75305 | } |
| 75275 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_text64( |
| 75306 | +SQLITE_API void SQLITE_APICALL sqlite3_result_text64( |
| 75276 | 75307 | sqlite3_context *pCtx, |
| 75277 | 75308 | const char *z, |
| 75278 | 75309 | sqlite3_uint64 n, |
| 75279 | 75310 | void (*xDel)(void *), |
| 75280 | 75311 | unsigned char enc |
| | @@ -75287,56 +75318,56 @@ |
| 75287 | 75318 | }else{ |
| 75288 | 75319 | setResultStrOrError(pCtx, z, (int)n, enc, xDel); |
| 75289 | 75320 | } |
| 75290 | 75321 | } |
| 75291 | 75322 | #ifndef SQLITE_OMIT_UTF16 |
| 75292 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_text16( |
| 75323 | +SQLITE_API void SQLITE_APICALL sqlite3_result_text16( |
| 75293 | 75324 | sqlite3_context *pCtx, |
| 75294 | 75325 | const void *z, |
| 75295 | 75326 | int n, |
| 75296 | 75327 | void (*xDel)(void *) |
| 75297 | 75328 | ){ |
| 75298 | 75329 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75299 | 75330 | setResultStrOrError(pCtx, z, n, SQLITE_UTF16NATIVE, xDel); |
| 75300 | 75331 | } |
| 75301 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be( |
| 75332 | +SQLITE_API void SQLITE_APICALL sqlite3_result_text16be( |
| 75302 | 75333 | sqlite3_context *pCtx, |
| 75303 | 75334 | const void *z, |
| 75304 | 75335 | int n, |
| 75305 | 75336 | void (*xDel)(void *) |
| 75306 | 75337 | ){ |
| 75307 | 75338 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75308 | 75339 | setResultStrOrError(pCtx, z, n, SQLITE_UTF16BE, xDel); |
| 75309 | 75340 | } |
| 75310 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le( |
| 75341 | +SQLITE_API void SQLITE_APICALL sqlite3_result_text16le( |
| 75311 | 75342 | sqlite3_context *pCtx, |
| 75312 | 75343 | const void *z, |
| 75313 | 75344 | int n, |
| 75314 | 75345 | void (*xDel)(void *) |
| 75315 | 75346 | ){ |
| 75316 | 75347 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75317 | 75348 | setResultStrOrError(pCtx, z, n, SQLITE_UTF16LE, xDel); |
| 75318 | 75349 | } |
| 75319 | 75350 | #endif /* SQLITE_OMIT_UTF16 */ |
| 75320 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){ |
| 75351 | +SQLITE_API void SQLITE_APICALL sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){ |
| 75321 | 75352 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75322 | 75353 | sqlite3VdbeMemCopy(pCtx->pOut, pValue); |
| 75323 | 75354 | } |
| 75324 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){ |
| 75355 | +SQLITE_API void SQLITE_APICALL sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){ |
| 75325 | 75356 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75326 | 75357 | sqlite3VdbeMemSetZeroBlob(pCtx->pOut, n); |
| 75327 | 75358 | } |
| 75328 | | -SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n){ |
| 75359 | +SQLITE_API int SQLITE_APICALL sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n){ |
| 75329 | 75360 | Mem *pOut = pCtx->pOut; |
| 75330 | 75361 | assert( sqlite3_mutex_held(pOut->db->mutex) ); |
| 75331 | 75362 | if( n>(u64)pOut->db->aLimit[SQLITE_LIMIT_LENGTH] ){ |
| 75332 | 75363 | return SQLITE_TOOBIG; |
| 75333 | 75364 | } |
| 75334 | 75365 | sqlite3VdbeMemSetZeroBlob(pCtx->pOut, (int)n); |
| 75335 | 75366 | return SQLITE_OK; |
| 75336 | 75367 | } |
| 75337 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){ |
| 75368 | +SQLITE_API void SQLITE_APICALL sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){ |
| 75338 | 75369 | pCtx->isError = errCode; |
| 75339 | 75370 | pCtx->fErrorOrAux = 1; |
| 75340 | 75371 | #ifdef SQLITE_DEBUG |
| 75341 | 75372 | if( pCtx->pVdbe ) pCtx->pVdbe->rcApp = errCode; |
| 75342 | 75373 | #endif |
| | @@ -75345,20 +75376,20 @@ |
| 75345 | 75376 | SQLITE_UTF8, SQLITE_STATIC); |
| 75346 | 75377 | } |
| 75347 | 75378 | } |
| 75348 | 75379 | |
| 75349 | 75380 | /* Force an SQLITE_TOOBIG error. */ |
| 75350 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context *pCtx){ |
| 75381 | +SQLITE_API void SQLITE_APICALL sqlite3_result_error_toobig(sqlite3_context *pCtx){ |
| 75351 | 75382 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75352 | 75383 | pCtx->isError = SQLITE_TOOBIG; |
| 75353 | 75384 | pCtx->fErrorOrAux = 1; |
| 75354 | 75385 | sqlite3VdbeMemSetStr(pCtx->pOut, "string or blob too big", -1, |
| 75355 | 75386 | SQLITE_UTF8, SQLITE_STATIC); |
| 75356 | 75387 | } |
| 75357 | 75388 | |
| 75358 | 75389 | /* An SQLITE_NOMEM error. */ |
| 75359 | | -SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context *pCtx){ |
| 75390 | +SQLITE_API void SQLITE_APICALL sqlite3_result_error_nomem(sqlite3_context *pCtx){ |
| 75360 | 75391 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75361 | 75392 | sqlite3VdbeMemSetNull(pCtx->pOut); |
| 75362 | 75393 | pCtx->isError = SQLITE_NOMEM_BKPT; |
| 75363 | 75394 | pCtx->fErrorOrAux = 1; |
| 75364 | 75395 | sqlite3OomFault(pCtx->pOut->db); |
| | @@ -75526,11 +75557,11 @@ |
| 75526 | 75557 | /* |
| 75527 | 75558 | ** This is the top-level implementation of sqlite3_step(). Call |
| 75528 | 75559 | ** sqlite3Step() to do most of the work. If a schema error occurs, |
| 75529 | 75560 | ** call sqlite3Reprepare() and try again. |
| 75530 | 75561 | */ |
| 75531 | | -SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt *pStmt){ |
| 75562 | +SQLITE_API int SQLITE_APICALL sqlite3_step(sqlite3_stmt *pStmt){ |
| 75532 | 75563 | int rc = SQLITE_OK; /* Result from sqlite3Step() */ |
| 75533 | 75564 | int rc2 = SQLITE_OK; /* Result from sqlite3Reprepare() */ |
| 75534 | 75565 | Vdbe *v = (Vdbe*)pStmt; /* the prepared statement */ |
| 75535 | 75566 | int cnt = 0; /* Counter to prevent infinite loop of reprepares */ |
| 75536 | 75567 | sqlite3 *db; /* The database connection */ |
| | @@ -75577,11 +75608,11 @@ |
| 75577 | 75608 | |
| 75578 | 75609 | /* |
| 75579 | 75610 | ** Extract the user data from a sqlite3_context structure and return a |
| 75580 | 75611 | ** pointer to it. |
| 75581 | 75612 | */ |
| 75582 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context *p){ |
| 75613 | +SQLITE_API void *SQLITE_APICALL sqlite3_user_data(sqlite3_context *p){ |
| 75583 | 75614 | assert( p && p->pFunc ); |
| 75584 | 75615 | return p->pFunc->pUserData; |
| 75585 | 75616 | } |
| 75586 | 75617 | |
| 75587 | 75618 | /* |
| | @@ -75592,11 +75623,11 @@ |
| 75592 | 75623 | ** returns a copy of the pointer to the database connection (the 1st |
| 75593 | 75624 | ** parameter) of the sqlite3_create_function() and |
| 75594 | 75625 | ** sqlite3_create_function16() routines that originally registered the |
| 75595 | 75626 | ** application defined function. |
| 75596 | 75627 | */ |
| 75597 | | -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context *p){ |
| 75628 | +SQLITE_API sqlite3 *SQLITE_APICALL sqlite3_context_db_handle(sqlite3_context *p){ |
| 75598 | 75629 | assert( p && p->pOut ); |
| 75599 | 75630 | return p->pOut->db; |
| 75600 | 75631 | } |
| 75601 | 75632 | |
| 75602 | 75633 | /* |
| | @@ -75668,11 +75699,11 @@ |
| 75668 | 75699 | /* |
| 75669 | 75700 | ** Allocate or return the aggregate context for a user function. A new |
| 75670 | 75701 | ** context is allocated on the first call. Subsequent calls return the |
| 75671 | 75702 | ** same context that was returned on prior calls. |
| 75672 | 75703 | */ |
| 75673 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context *p, int nByte){ |
| 75704 | +SQLITE_API void *SQLITE_APICALL sqlite3_aggregate_context(sqlite3_context *p, int nByte){ |
| 75674 | 75705 | assert( p && p->pFunc && p->pFunc->xFinalize ); |
| 75675 | 75706 | assert( sqlite3_mutex_held(p->pOut->db->mutex) ); |
| 75676 | 75707 | testcase( nByte<0 ); |
| 75677 | 75708 | if( (p->pMem->flags & MEM_Agg)==0 ){ |
| 75678 | 75709 | return createAggContext(p, nByte); |
| | @@ -75683,11 +75714,11 @@ |
| 75683 | 75714 | |
| 75684 | 75715 | /* |
| 75685 | 75716 | ** Return the auxiliary data pointer, if any, for the iArg'th argument to |
| 75686 | 75717 | ** the user-function defined by pCtx. |
| 75687 | 75718 | */ |
| 75688 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){ |
| 75719 | +SQLITE_API void *SQLITE_APICALL sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){ |
| 75689 | 75720 | AuxData *pAuxData; |
| 75690 | 75721 | |
| 75691 | 75722 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 75692 | 75723 | #if SQLITE_ENABLE_STAT3_OR_STAT4 |
| 75693 | 75724 | if( pCtx->pVdbe==0 ) return 0; |
| | @@ -75704,11 +75735,11 @@ |
| 75704 | 75735 | /* |
| 75705 | 75736 | ** Set the auxiliary data pointer and delete function, for the iArg'th |
| 75706 | 75737 | ** argument to the user-function defined by pCtx. Any previous value is |
| 75707 | 75738 | ** deleted by calling the delete function specified when it was set. |
| 75708 | 75739 | */ |
| 75709 | | -SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata( |
| 75740 | +SQLITE_API void SQLITE_APICALL sqlite3_set_auxdata( |
| 75710 | 75741 | sqlite3_context *pCtx, |
| 75711 | 75742 | int iArg, |
| 75712 | 75743 | void *pAux, |
| 75713 | 75744 | void (*xDelete)(void*) |
| 75714 | 75745 | ){ |
| | @@ -75759,29 +75790,29 @@ |
| 75759 | 75790 | ** This function is deprecated. Do not use it for new code. It is |
| 75760 | 75791 | ** provide only to avoid breaking legacy code. New aggregate function |
| 75761 | 75792 | ** implementations should keep their own counts within their aggregate |
| 75762 | 75793 | ** context. |
| 75763 | 75794 | */ |
| 75764 | | -SQLITE_API int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context *p){ |
| 75795 | +SQLITE_API int SQLITE_APICALL sqlite3_aggregate_count(sqlite3_context *p){ |
| 75765 | 75796 | assert( p && p->pMem && p->pFunc && p->pFunc->xFinalize ); |
| 75766 | 75797 | return p->pMem->n; |
| 75767 | 75798 | } |
| 75768 | 75799 | #endif |
| 75769 | 75800 | |
| 75770 | 75801 | /* |
| 75771 | 75802 | ** Return the number of columns in the result set for the statement pStmt. |
| 75772 | 75803 | */ |
| 75773 | | -SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt){ |
| 75804 | +SQLITE_API int SQLITE_APICALL sqlite3_column_count(sqlite3_stmt *pStmt){ |
| 75774 | 75805 | Vdbe *pVm = (Vdbe *)pStmt; |
| 75775 | 75806 | return pVm ? pVm->nResColumn : 0; |
| 75776 | 75807 | } |
| 75777 | 75808 | |
| 75778 | 75809 | /* |
| 75779 | 75810 | ** Return the number of values available from the current row of the |
| 75780 | 75811 | ** currently executing statement pStmt. |
| 75781 | 75812 | */ |
| 75782 | | -SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt){ |
| 75813 | +SQLITE_API int SQLITE_APICALL sqlite3_data_count(sqlite3_stmt *pStmt){ |
| 75783 | 75814 | Vdbe *pVm = (Vdbe *)pStmt; |
| 75784 | 75815 | if( pVm==0 || pVm->pResultSet==0 ) return 0; |
| 75785 | 75816 | return pVm->nResColumn; |
| 75786 | 75817 | } |
| 75787 | 75818 | |
| | @@ -75880,67 +75911,67 @@ |
| 75880 | 75911 | |
| 75881 | 75912 | /**************************** sqlite3_column_ ******************************* |
| 75882 | 75913 | ** The following routines are used to access elements of the current row |
| 75883 | 75914 | ** in the result set. |
| 75884 | 75915 | */ |
| 75885 | | -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt *pStmt, int i){ |
| 75916 | +SQLITE_API const void *SQLITE_APICALL sqlite3_column_blob(sqlite3_stmt *pStmt, int i){ |
| 75886 | 75917 | const void *val; |
| 75887 | 75918 | val = sqlite3_value_blob( columnMem(pStmt,i) ); |
| 75888 | 75919 | /* Even though there is no encoding conversion, value_blob() might |
| 75889 | 75920 | ** need to call malloc() to expand the result of a zeroblob() |
| 75890 | 75921 | ** expression. |
| 75891 | 75922 | */ |
| 75892 | 75923 | columnMallocFailure(pStmt); |
| 75893 | 75924 | return val; |
| 75894 | 75925 | } |
| 75895 | | -SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt *pStmt, int i){ |
| 75926 | +SQLITE_API int SQLITE_APICALL sqlite3_column_bytes(sqlite3_stmt *pStmt, int i){ |
| 75896 | 75927 | int val = sqlite3_value_bytes( columnMem(pStmt,i) ); |
| 75897 | 75928 | columnMallocFailure(pStmt); |
| 75898 | 75929 | return val; |
| 75899 | 75930 | } |
| 75900 | | -SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt *pStmt, int i){ |
| 75931 | +SQLITE_API int SQLITE_APICALL sqlite3_column_bytes16(sqlite3_stmt *pStmt, int i){ |
| 75901 | 75932 | int val = sqlite3_value_bytes16( columnMem(pStmt,i) ); |
| 75902 | 75933 | columnMallocFailure(pStmt); |
| 75903 | 75934 | return val; |
| 75904 | 75935 | } |
| 75905 | | -SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt *pStmt, int i){ |
| 75936 | +SQLITE_API double SQLITE_APICALL sqlite3_column_double(sqlite3_stmt *pStmt, int i){ |
| 75906 | 75937 | double val = sqlite3_value_double( columnMem(pStmt,i) ); |
| 75907 | 75938 | columnMallocFailure(pStmt); |
| 75908 | 75939 | return val; |
| 75909 | 75940 | } |
| 75910 | | -SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt *pStmt, int i){ |
| 75941 | +SQLITE_API int SQLITE_APICALL sqlite3_column_int(sqlite3_stmt *pStmt, int i){ |
| 75911 | 75942 | int val = sqlite3_value_int( columnMem(pStmt,i) ); |
| 75912 | 75943 | columnMallocFailure(pStmt); |
| 75913 | 75944 | return val; |
| 75914 | 75945 | } |
| 75915 | | -SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt *pStmt, int i){ |
| 75946 | +SQLITE_API sqlite_int64 SQLITE_APICALL sqlite3_column_int64(sqlite3_stmt *pStmt, int i){ |
| 75916 | 75947 | sqlite_int64 val = sqlite3_value_int64( columnMem(pStmt,i) ); |
| 75917 | 75948 | columnMallocFailure(pStmt); |
| 75918 | 75949 | return val; |
| 75919 | 75950 | } |
| 75920 | | -SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt *pStmt, int i){ |
| 75951 | +SQLITE_API const unsigned char *SQLITE_APICALL sqlite3_column_text(sqlite3_stmt *pStmt, int i){ |
| 75921 | 75952 | const unsigned char *val = sqlite3_value_text( columnMem(pStmt,i) ); |
| 75922 | 75953 | columnMallocFailure(pStmt); |
| 75923 | 75954 | return val; |
| 75924 | 75955 | } |
| 75925 | | -SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt *pStmt, int i){ |
| 75956 | +SQLITE_API sqlite3_value *SQLITE_APICALL sqlite3_column_value(sqlite3_stmt *pStmt, int i){ |
| 75926 | 75957 | Mem *pOut = columnMem(pStmt, i); |
| 75927 | 75958 | if( pOut->flags&MEM_Static ){ |
| 75928 | 75959 | pOut->flags &= ~MEM_Static; |
| 75929 | 75960 | pOut->flags |= MEM_Ephem; |
| 75930 | 75961 | } |
| 75931 | 75962 | columnMallocFailure(pStmt); |
| 75932 | 75963 | return (sqlite3_value *)pOut; |
| 75933 | 75964 | } |
| 75934 | 75965 | #ifndef SQLITE_OMIT_UTF16 |
| 75935 | | -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt *pStmt, int i){ |
| 75966 | +SQLITE_API const void *SQLITE_APICALL sqlite3_column_text16(sqlite3_stmt *pStmt, int i){ |
| 75936 | 75967 | const void *val = sqlite3_value_text16( columnMem(pStmt,i) ); |
| 75937 | 75968 | columnMallocFailure(pStmt); |
| 75938 | 75969 | return val; |
| 75939 | 75970 | } |
| 75940 | 75971 | #endif /* SQLITE_OMIT_UTF16 */ |
| 75941 | | -SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt *pStmt, int i){ |
| 75972 | +SQLITE_API int SQLITE_APICALL sqlite3_column_type(sqlite3_stmt *pStmt, int i){ |
| 75942 | 75973 | int iType = sqlite3_value_type( columnMem(pStmt,i) ); |
| 75943 | 75974 | columnMallocFailure(pStmt); |
| 75944 | 75975 | return iType; |
| 75945 | 75976 | } |
| 75946 | 75977 | |
| | @@ -76000,16 +76031,16 @@ |
| 76000 | 76031 | |
| 76001 | 76032 | /* |
| 76002 | 76033 | ** Return the name of the Nth column of the result set returned by SQL |
| 76003 | 76034 | ** statement pStmt. |
| 76004 | 76035 | */ |
| 76005 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt *pStmt, int N){ |
| 76036 | +SQLITE_API const char *SQLITE_APICALL sqlite3_column_name(sqlite3_stmt *pStmt, int N){ |
| 76006 | 76037 | return columnName( |
| 76007 | 76038 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_NAME); |
| 76008 | 76039 | } |
| 76009 | 76040 | #ifndef SQLITE_OMIT_UTF16 |
| 76010 | | -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt *pStmt, int N){ |
| 76041 | +SQLITE_API const void *SQLITE_APICALL sqlite3_column_name16(sqlite3_stmt *pStmt, int N){ |
| 76011 | 76042 | return columnName( |
| 76012 | 76043 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_NAME); |
| 76013 | 76044 | } |
| 76014 | 76045 | #endif |
| 76015 | 76046 | |
| | @@ -76025,16 +76056,16 @@ |
| 76025 | 76056 | #ifndef SQLITE_OMIT_DECLTYPE |
| 76026 | 76057 | /* |
| 76027 | 76058 | ** Return the column declaration type (if applicable) of the 'i'th column |
| 76028 | 76059 | ** of the result set of SQL statement pStmt. |
| 76029 | 76060 | */ |
| 76030 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt *pStmt, int N){ |
| 76061 | +SQLITE_API const char *SQLITE_APICALL sqlite3_column_decltype(sqlite3_stmt *pStmt, int N){ |
| 76031 | 76062 | return columnName( |
| 76032 | 76063 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DECLTYPE); |
| 76033 | 76064 | } |
| 76034 | 76065 | #ifndef SQLITE_OMIT_UTF16 |
| 76035 | | -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt *pStmt, int N){ |
| 76066 | +SQLITE_API const void *SQLITE_APICALL sqlite3_column_decltype16(sqlite3_stmt *pStmt, int N){ |
| 76036 | 76067 | return columnName( |
| 76037 | 76068 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DECLTYPE); |
| 76038 | 76069 | } |
| 76039 | 76070 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76040 | 76071 | #endif /* SQLITE_OMIT_DECLTYPE */ |
| | @@ -76043,16 +76074,16 @@ |
| 76043 | 76074 | /* |
| 76044 | 76075 | ** Return the name of the database from which a result column derives. |
| 76045 | 76076 | ** NULL is returned if the result column is an expression or constant or |
| 76046 | 76077 | ** anything else which is not an unambiguous reference to a database column. |
| 76047 | 76078 | */ |
| 76048 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt *pStmt, int N){ |
| 76079 | +SQLITE_API const char *SQLITE_APICALL sqlite3_column_database_name(sqlite3_stmt *pStmt, int N){ |
| 76049 | 76080 | return columnName( |
| 76050 | 76081 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DATABASE); |
| 76051 | 76082 | } |
| 76052 | 76083 | #ifndef SQLITE_OMIT_UTF16 |
| 76053 | | -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt *pStmt, int N){ |
| 76084 | +SQLITE_API const void *SQLITE_APICALL sqlite3_column_database_name16(sqlite3_stmt *pStmt, int N){ |
| 76054 | 76085 | return columnName( |
| 76055 | 76086 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DATABASE); |
| 76056 | 76087 | } |
| 76057 | 76088 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76058 | 76089 | |
| | @@ -76059,16 +76090,16 @@ |
| 76059 | 76090 | /* |
| 76060 | 76091 | ** Return the name of the table from which a result column derives. |
| 76061 | 76092 | ** NULL is returned if the result column is an expression or constant or |
| 76062 | 76093 | ** anything else which is not an unambiguous reference to a database column. |
| 76063 | 76094 | */ |
| 76064 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt *pStmt, int N){ |
| 76095 | +SQLITE_API const char *SQLITE_APICALL sqlite3_column_table_name(sqlite3_stmt *pStmt, int N){ |
| 76065 | 76096 | return columnName( |
| 76066 | 76097 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_TABLE); |
| 76067 | 76098 | } |
| 76068 | 76099 | #ifndef SQLITE_OMIT_UTF16 |
| 76069 | | -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt *pStmt, int N){ |
| 76100 | +SQLITE_API const void *SQLITE_APICALL sqlite3_column_table_name16(sqlite3_stmt *pStmt, int N){ |
| 76070 | 76101 | return columnName( |
| 76071 | 76102 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_TABLE); |
| 76072 | 76103 | } |
| 76073 | 76104 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76074 | 76105 | |
| | @@ -76075,16 +76106,16 @@ |
| 76075 | 76106 | /* |
| 76076 | 76107 | ** Return the name of the table column from which a result column derives. |
| 76077 | 76108 | ** NULL is returned if the result column is an expression or constant or |
| 76078 | 76109 | ** anything else which is not an unambiguous reference to a database column. |
| 76079 | 76110 | */ |
| 76080 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt *pStmt, int N){ |
| 76111 | +SQLITE_API const char *SQLITE_APICALL sqlite3_column_origin_name(sqlite3_stmt *pStmt, int N){ |
| 76081 | 76112 | return columnName( |
| 76082 | 76113 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_COLUMN); |
| 76083 | 76114 | } |
| 76084 | 76115 | #ifndef SQLITE_OMIT_UTF16 |
| 76085 | | -SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){ |
| 76116 | +SQLITE_API const void *SQLITE_APICALL sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){ |
| 76086 | 76117 | return columnName( |
| 76087 | 76118 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_COLUMN); |
| 76088 | 76119 | } |
| 76089 | 76120 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76090 | 76121 | #endif /* SQLITE_ENABLE_COLUMN_METADATA */ |
| | @@ -76181,11 +76212,11 @@ |
| 76181 | 76212 | |
| 76182 | 76213 | |
| 76183 | 76214 | /* |
| 76184 | 76215 | ** Bind a blob value to an SQL statement variable. |
| 76185 | 76216 | */ |
| 76186 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob( |
| 76217 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_blob( |
| 76187 | 76218 | sqlite3_stmt *pStmt, |
| 76188 | 76219 | int i, |
| 76189 | 76220 | const void *zData, |
| 76190 | 76221 | int nData, |
| 76191 | 76222 | void (*xDel)(void*) |
| | @@ -76193,11 +76224,11 @@ |
| 76193 | 76224 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 76194 | 76225 | if( nData<0 ) return SQLITE_MISUSE_BKPT; |
| 76195 | 76226 | #endif |
| 76196 | 76227 | return bindText(pStmt, i, zData, nData, xDel, 0); |
| 76197 | 76228 | } |
| 76198 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64( |
| 76229 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_blob64( |
| 76199 | 76230 | sqlite3_stmt *pStmt, |
| 76200 | 76231 | int i, |
| 76201 | 76232 | const void *zData, |
| 76202 | 76233 | sqlite3_uint64 nData, |
| 76203 | 76234 | void (*xDel)(void*) |
| | @@ -76207,52 +76238,52 @@ |
| 76207 | 76238 | return invokeValueDestructor(zData, xDel, 0); |
| 76208 | 76239 | }else{ |
| 76209 | 76240 | return bindText(pStmt, i, zData, (int)nData, xDel, 0); |
| 76210 | 76241 | } |
| 76211 | 76242 | } |
| 76212 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){ |
| 76243 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){ |
| 76213 | 76244 | int rc; |
| 76214 | 76245 | Vdbe *p = (Vdbe *)pStmt; |
| 76215 | 76246 | rc = vdbeUnbind(p, i); |
| 76216 | 76247 | if( rc==SQLITE_OK ){ |
| 76217 | 76248 | sqlite3VdbeMemSetDouble(&p->aVar[i-1], rValue); |
| 76218 | 76249 | sqlite3_mutex_leave(p->db->mutex); |
| 76219 | 76250 | } |
| 76220 | 76251 | return rc; |
| 76221 | 76252 | } |
| 76222 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt *p, int i, int iValue){ |
| 76253 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_int(sqlite3_stmt *p, int i, int iValue){ |
| 76223 | 76254 | return sqlite3_bind_int64(p, i, (i64)iValue); |
| 76224 | 76255 | } |
| 76225 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){ |
| 76256 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){ |
| 76226 | 76257 | int rc; |
| 76227 | 76258 | Vdbe *p = (Vdbe *)pStmt; |
| 76228 | 76259 | rc = vdbeUnbind(p, i); |
| 76229 | 76260 | if( rc==SQLITE_OK ){ |
| 76230 | 76261 | sqlite3VdbeMemSetInt64(&p->aVar[i-1], iValue); |
| 76231 | 76262 | sqlite3_mutex_leave(p->db->mutex); |
| 76232 | 76263 | } |
| 76233 | 76264 | return rc; |
| 76234 | 76265 | } |
| 76235 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt *pStmt, int i){ |
| 76266 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_null(sqlite3_stmt *pStmt, int i){ |
| 76236 | 76267 | int rc; |
| 76237 | 76268 | Vdbe *p = (Vdbe*)pStmt; |
| 76238 | 76269 | rc = vdbeUnbind(p, i); |
| 76239 | 76270 | if( rc==SQLITE_OK ){ |
| 76240 | 76271 | sqlite3_mutex_leave(p->db->mutex); |
| 76241 | 76272 | } |
| 76242 | 76273 | return rc; |
| 76243 | 76274 | } |
| 76244 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_text( |
| 76275 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_text( |
| 76245 | 76276 | sqlite3_stmt *pStmt, |
| 76246 | 76277 | int i, |
| 76247 | 76278 | const char *zData, |
| 76248 | 76279 | int nData, |
| 76249 | 76280 | void (*xDel)(void*) |
| 76250 | 76281 | ){ |
| 76251 | 76282 | return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF8); |
| 76252 | 76283 | } |
| 76253 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64( |
| 76284 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_text64( |
| 76254 | 76285 | sqlite3_stmt *pStmt, |
| 76255 | 76286 | int i, |
| 76256 | 76287 | const char *zData, |
| 76257 | 76288 | sqlite3_uint64 nData, |
| 76258 | 76289 | void (*xDel)(void*), |
| | @@ -76265,21 +76296,21 @@ |
| 76265 | 76296 | if( enc==SQLITE_UTF16 ) enc = SQLITE_UTF16NATIVE; |
| 76266 | 76297 | return bindText(pStmt, i, zData, (int)nData, xDel, enc); |
| 76267 | 76298 | } |
| 76268 | 76299 | } |
| 76269 | 76300 | #ifndef SQLITE_OMIT_UTF16 |
| 76270 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16( |
| 76301 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_text16( |
| 76271 | 76302 | sqlite3_stmt *pStmt, |
| 76272 | 76303 | int i, |
| 76273 | 76304 | const void *zData, |
| 76274 | 76305 | int nData, |
| 76275 | 76306 | void (*xDel)(void*) |
| 76276 | 76307 | ){ |
| 76277 | 76308 | return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF16NATIVE); |
| 76278 | 76309 | } |
| 76279 | 76310 | #endif /* SQLITE_OMIT_UTF16 */ |
| 76280 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){ |
| 76311 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){ |
| 76281 | 76312 | int rc; |
| 76282 | 76313 | switch( sqlite3_value_type((sqlite3_value*)pValue) ){ |
| 76283 | 76314 | case SQLITE_INTEGER: { |
| 76284 | 76315 | rc = sqlite3_bind_int64(pStmt, i, pValue->u.i); |
| 76285 | 76316 | break; |
| | @@ -76306,21 +76337,21 @@ |
| 76306 | 76337 | break; |
| 76307 | 76338 | } |
| 76308 | 76339 | } |
| 76309 | 76340 | return rc; |
| 76310 | 76341 | } |
| 76311 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){ |
| 76342 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){ |
| 76312 | 76343 | int rc; |
| 76313 | 76344 | Vdbe *p = (Vdbe *)pStmt; |
| 76314 | 76345 | rc = vdbeUnbind(p, i); |
| 76315 | 76346 | if( rc==SQLITE_OK ){ |
| 76316 | 76347 | sqlite3VdbeMemSetZeroBlob(&p->aVar[i-1], n); |
| 76317 | 76348 | sqlite3_mutex_leave(p->db->mutex); |
| 76318 | 76349 | } |
| 76319 | 76350 | return rc; |
| 76320 | 76351 | } |
| 76321 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt *pStmt, int i, sqlite3_uint64 n){ |
| 76352 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_zeroblob64(sqlite3_stmt *pStmt, int i, sqlite3_uint64 n){ |
| 76322 | 76353 | int rc; |
| 76323 | 76354 | Vdbe *p = (Vdbe *)pStmt; |
| 76324 | 76355 | sqlite3_mutex_enter(p->db->mutex); |
| 76325 | 76356 | if( n>(u64)p->db->aLimit[SQLITE_LIMIT_LENGTH] ){ |
| 76326 | 76357 | rc = SQLITE_TOOBIG; |
| | @@ -76335,11 +76366,11 @@ |
| 76335 | 76366 | |
| 76336 | 76367 | /* |
| 76337 | 76368 | ** Return the number of wildcards that can be potentially bound to. |
| 76338 | 76369 | ** This routine is added to support DBD::SQLite. |
| 76339 | 76370 | */ |
| 76340 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){ |
| 76371 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){ |
| 76341 | 76372 | Vdbe *p = (Vdbe*)pStmt; |
| 76342 | 76373 | return p ? p->nVar : 0; |
| 76343 | 76374 | } |
| 76344 | 76375 | |
| 76345 | 76376 | /* |
| | @@ -76346,11 +76377,11 @@ |
| 76346 | 76377 | ** Return the name of a wildcard parameter. Return NULL if the index |
| 76347 | 76378 | ** is out of range or if the wildcard is unnamed. |
| 76348 | 76379 | ** |
| 76349 | 76380 | ** The result is always UTF-8. |
| 76350 | 76381 | */ |
| 76351 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt *pStmt, int i){ |
| 76382 | +SQLITE_API const char *SQLITE_APICALL sqlite3_bind_parameter_name(sqlite3_stmt *pStmt, int i){ |
| 76352 | 76383 | Vdbe *p = (Vdbe*)pStmt; |
| 76353 | 76384 | if( p==0 || i<1 || i>p->nzVar ){ |
| 76354 | 76385 | return 0; |
| 76355 | 76386 | } |
| 76356 | 76387 | return p->azVar[i-1]; |
| | @@ -76374,11 +76405,11 @@ |
| 76374 | 76405 | } |
| 76375 | 76406 | } |
| 76376 | 76407 | } |
| 76377 | 76408 | return 0; |
| 76378 | 76409 | } |
| 76379 | | -SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){ |
| 76410 | +SQLITE_API int SQLITE_APICALL sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){ |
| 76380 | 76411 | return sqlite3VdbeParameterIndex((Vdbe*)pStmt, zName, sqlite3Strlen30(zName)); |
| 76381 | 76412 | } |
| 76382 | 76413 | |
| 76383 | 76414 | /* |
| 76384 | 76415 | ** Transfer all bindings from the first statement over to the second. |
| | @@ -76408,11 +76439,11 @@ |
| 76408 | 76439 | ** |
| 76409 | 76440 | ** If the two statements contain a different number of bindings, then |
| 76410 | 76441 | ** an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise |
| 76411 | 76442 | ** SQLITE_OK is returned. |
| 76412 | 76443 | */ |
| 76413 | | -SQLITE_API int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){ |
| 76444 | +SQLITE_API int SQLITE_APICALL sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){ |
| 76414 | 76445 | Vdbe *pFrom = (Vdbe*)pFromStmt; |
| 76415 | 76446 | Vdbe *pTo = (Vdbe*)pToStmt; |
| 76416 | 76447 | if( pFrom->nVar!=pTo->nVar ){ |
| 76417 | 76448 | return SQLITE_ERROR; |
| 76418 | 76449 | } |
| | @@ -76430,26 +76461,26 @@ |
| 76430 | 76461 | ** Return the sqlite3* database handle to which the prepared statement given |
| 76431 | 76462 | ** in the argument belongs. This is the same database handle that was |
| 76432 | 76463 | ** the first argument to the sqlite3_prepare() that was used to create |
| 76433 | 76464 | ** the statement in the first place. |
| 76434 | 76465 | */ |
| 76435 | | -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt *pStmt){ |
| 76466 | +SQLITE_API sqlite3 *SQLITE_APICALL sqlite3_db_handle(sqlite3_stmt *pStmt){ |
| 76436 | 76467 | return pStmt ? ((Vdbe*)pStmt)->db : 0; |
| 76437 | 76468 | } |
| 76438 | 76469 | |
| 76439 | 76470 | /* |
| 76440 | 76471 | ** Return true if the prepared statement is guaranteed to not modify the |
| 76441 | 76472 | ** database. |
| 76442 | 76473 | */ |
| 76443 | | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt){ |
| 76474 | +SQLITE_API int SQLITE_APICALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt){ |
| 76444 | 76475 | return pStmt ? ((Vdbe*)pStmt)->readOnly : 1; |
| 76445 | 76476 | } |
| 76446 | 76477 | |
| 76447 | 76478 | /* |
| 76448 | 76479 | ** Return true if the prepared statement is in need of being reset. |
| 76449 | 76480 | */ |
| 76450 | | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt *pStmt){ |
| 76481 | +SQLITE_API int SQLITE_APICALL sqlite3_stmt_busy(sqlite3_stmt *pStmt){ |
| 76451 | 76482 | Vdbe *v = (Vdbe*)pStmt; |
| 76452 | 76483 | return v!=0 && v->pc>=0 && v->magic==VDBE_MAGIC_RUN; |
| 76453 | 76484 | } |
| 76454 | 76485 | |
| 76455 | 76486 | /* |
| | @@ -76456,11 +76487,11 @@ |
| 76456 | 76487 | ** Return a pointer to the next prepared statement after pStmt associated |
| 76457 | 76488 | ** with database connection pDb. If pStmt is NULL, return the first |
| 76458 | 76489 | ** prepared statement for the database connection. Return NULL if there |
| 76459 | 76490 | ** are no more. |
| 76460 | 76491 | */ |
| 76461 | | -SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){ |
| 76492 | +SQLITE_API sqlite3_stmt *SQLITE_APICALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){ |
| 76462 | 76493 | sqlite3_stmt *pNext; |
| 76463 | 76494 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 76464 | 76495 | if( !sqlite3SafetyCheckOk(pDb) ){ |
| 76465 | 76496 | (void)SQLITE_MISUSE_BKPT; |
| 76466 | 76497 | return 0; |
| | @@ -76477,11 +76508,11 @@ |
| 76477 | 76508 | } |
| 76478 | 76509 | |
| 76479 | 76510 | /* |
| 76480 | 76511 | ** Return the value of a status counter for a prepared statement |
| 76481 | 76512 | */ |
| 76482 | | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){ |
| 76513 | +SQLITE_API int SQLITE_APICALL sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){ |
| 76483 | 76514 | Vdbe *pVdbe = (Vdbe*)pStmt; |
| 76484 | 76515 | u32 v; |
| 76485 | 76516 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 76486 | 76517 | if( !pStmt ){ |
| 76487 | 76518 | (void)SQLITE_MISUSE_BKPT; |
| | @@ -76494,11 +76525,11 @@ |
| 76494 | 76525 | } |
| 76495 | 76526 | |
| 76496 | 76527 | /* |
| 76497 | 76528 | ** Return the SQL associated with a prepared statement |
| 76498 | 76529 | */ |
| 76499 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt){ |
| 76530 | +SQLITE_API const char *SQLITE_APICALL sqlite3_sql(sqlite3_stmt *pStmt){ |
| 76500 | 76531 | Vdbe *p = (Vdbe *)pStmt; |
| 76501 | 76532 | return p ? p->zSql : 0; |
| 76502 | 76533 | } |
| 76503 | 76534 | |
| 76504 | 76535 | /* |
| | @@ -76508,11 +76539,11 @@ |
| 76508 | 76539 | ** freeing the returned string by passing it to sqlite3_free(). |
| 76509 | 76540 | ** |
| 76510 | 76541 | ** The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of |
| 76511 | 76542 | ** expanded bound parameters. |
| 76512 | 76543 | */ |
| 76513 | | -SQLITE_API char *SQLITE_STDCALL sqlite3_expanded_sql(sqlite3_stmt *pStmt){ |
| 76544 | +SQLITE_API char *SQLITE_APICALL sqlite3_expanded_sql(sqlite3_stmt *pStmt){ |
| 76514 | 76545 | #ifdef SQLITE_OMIT_TRACE |
| 76515 | 76546 | return 0; |
| 76516 | 76547 | #else |
| 76517 | 76548 | char *z = 0; |
| 76518 | 76549 | const char *zSql = sqlite3_sql(pStmt); |
| | @@ -76550,11 +76581,11 @@ |
| 76550 | 76581 | |
| 76551 | 76582 | /* |
| 76552 | 76583 | ** This function is called from within a pre-update callback to retrieve |
| 76553 | 76584 | ** a field of the row currently being updated or deleted. |
| 76554 | 76585 | */ |
| 76555 | | -SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_old(sqlite3 *db, int iIdx, sqlite3_value **ppValue){ |
| 76586 | +SQLITE_API int SQLITE_APICALL sqlite3_preupdate_old(sqlite3 *db, int iIdx, sqlite3_value **ppValue){ |
| 76556 | 76587 | PreUpdate *p = db->pPreUpdate; |
| 76557 | 76588 | int rc = SQLITE_OK; |
| 76558 | 76589 | |
| 76559 | 76590 | /* Test that this call is being made from within an SQLITE_DELETE or |
| 76560 | 76591 | ** SQLITE_UPDATE pre-update callback, and that iIdx is within range. */ |
| | @@ -76605,11 +76636,11 @@ |
| 76605 | 76636 | #ifdef SQLITE_ENABLE_PREUPDATE_HOOK |
| 76606 | 76637 | /* |
| 76607 | 76638 | ** This function is called from within a pre-update callback to retrieve |
| 76608 | 76639 | ** the number of columns in the row being updated, deleted or inserted. |
| 76609 | 76640 | */ |
| 76610 | | -SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_count(sqlite3 *db){ |
| 76641 | +SQLITE_API int SQLITE_APICALL sqlite3_preupdate_count(sqlite3 *db){ |
| 76611 | 76642 | PreUpdate *p = db->pPreUpdate; |
| 76612 | 76643 | return (p ? p->keyinfo.nField : 0); |
| 76613 | 76644 | } |
| 76614 | 76645 | #endif /* SQLITE_ENABLE_PREUPDATE_HOOK */ |
| 76615 | 76646 | |
| | @@ -76623,11 +76654,11 @@ |
| 76623 | 76654 | ** top-level trigger etc.). |
| 76624 | 76655 | ** |
| 76625 | 76656 | ** For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL |
| 76626 | 76657 | ** or SET DEFAULT action is considered a trigger. |
| 76627 | 76658 | */ |
| 76628 | | -SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_depth(sqlite3 *db){ |
| 76659 | +SQLITE_API int SQLITE_APICALL sqlite3_preupdate_depth(sqlite3 *db){ |
| 76629 | 76660 | PreUpdate *p = db->pPreUpdate; |
| 76630 | 76661 | return (p ? p->v->nFrame : 0); |
| 76631 | 76662 | } |
| 76632 | 76663 | #endif /* SQLITE_ENABLE_PREUPDATE_HOOK */ |
| 76633 | 76664 | |
| | @@ -76634,11 +76665,11 @@ |
| 76634 | 76665 | #ifdef SQLITE_ENABLE_PREUPDATE_HOOK |
| 76635 | 76666 | /* |
| 76636 | 76667 | ** This function is called from within a pre-update callback to retrieve |
| 76637 | 76668 | ** a field of the row currently being updated or inserted. |
| 76638 | 76669 | */ |
| 76639 | | -SQLITE_API int SQLITE_STDCALL sqlite3_preupdate_new(sqlite3 *db, int iIdx, sqlite3_value **ppValue){ |
| 76670 | +SQLITE_API int SQLITE_APICALL sqlite3_preupdate_new(sqlite3 *db, int iIdx, sqlite3_value **ppValue){ |
| 76640 | 76671 | PreUpdate *p = db->pPreUpdate; |
| 76641 | 76672 | int rc = SQLITE_OK; |
| 76642 | 76673 | Mem *pMem; |
| 76643 | 76674 | |
| 76644 | 76675 | if( !p || p->op==SQLITE_DELETE ){ |
| | @@ -76708,11 +76739,11 @@ |
| 76708 | 76739 | |
| 76709 | 76740 | #ifdef SQLITE_ENABLE_STMT_SCANSTATUS |
| 76710 | 76741 | /* |
| 76711 | 76742 | ** Return status data for a single loop within query pStmt. |
| 76712 | 76743 | */ |
| 76713 | | -SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus( |
| 76744 | +SQLITE_API int SQLITE_APICALL sqlite3_stmt_scanstatus( |
| 76714 | 76745 | sqlite3_stmt *pStmt, /* Prepared statement being queried */ |
| 76715 | 76746 | int idx, /* Index of loop to report on */ |
| 76716 | 76747 | int iScanStatusOp, /* Which metric to return */ |
| 76717 | 76748 | void *pOut /* OUT: Write the answer here */ |
| 76718 | 76749 | ){ |
| | @@ -76767,11 +76798,11 @@ |
| 76767 | 76798 | } |
| 76768 | 76799 | |
| 76769 | 76800 | /* |
| 76770 | 76801 | ** Zero all counters associated with the sqlite3_stmt_scanstatus() data. |
| 76771 | 76802 | */ |
| 76772 | | -SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){ |
| 76803 | +SQLITE_API void SQLITE_APICALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){ |
| 76773 | 76804 | Vdbe *p = (Vdbe*)pStmt; |
| 76774 | 76805 | memset(p->anExec, 0, p->nOp * sizeof(i64)); |
| 76775 | 76806 | } |
| 76776 | 76807 | #endif /* SQLITE_ENABLE_STMT_SCANSTATUS */ |
| 76777 | 76808 | |
| | @@ -77294,11 +77325,11 @@ |
| 77294 | 77325 | ** Try to convert the type of a function argument or a result column |
| 77295 | 77326 | ** into a numeric representation. Use either INTEGER or REAL whichever |
| 77296 | 77327 | ** is appropriate. But only do the conversion if it is possible without |
| 77297 | 77328 | ** loss of information and return the revised type of the argument. |
| 77298 | 77329 | */ |
| 77299 | | -SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value *pVal){ |
| 77330 | +SQLITE_API int SQLITE_APICALL sqlite3_value_numeric_type(sqlite3_value *pVal){ |
| 77300 | 77331 | int eType = sqlite3_value_type(pVal); |
| 77301 | 77332 | if( eType==SQLITE_TEXT ){ |
| 77302 | 77333 | Mem *pMem = (Mem*)pVal; |
| 77303 | 77334 | applyNumericAffinity(pMem, 0); |
| 77304 | 77335 | eType = sqlite3_value_type(pVal); |
| | @@ -84146,11 +84177,11 @@ |
| 84146 | 84177 | } |
| 84147 | 84178 | |
| 84148 | 84179 | /* |
| 84149 | 84180 | ** Open a blob handle. |
| 84150 | 84181 | */ |
| 84151 | | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_open( |
| 84182 | +SQLITE_API int SQLITE_APICALL sqlite3_blob_open( |
| 84152 | 84183 | sqlite3* db, /* The database connection */ |
| 84153 | 84184 | const char *zDb, /* The attached database containing the blob */ |
| 84154 | 84185 | const char *zTable, /* The table containing the blob */ |
| 84155 | 84186 | const char *zColumn, /* The column containing the blob */ |
| 84156 | 84187 | sqlite_int64 iRow, /* The row containing the glob */ |
| | @@ -84387,11 +84418,11 @@ |
| 84387 | 84418 | |
| 84388 | 84419 | /* |
| 84389 | 84420 | ** Close a blob handle that was previously created using |
| 84390 | 84421 | ** sqlite3_blob_open(). |
| 84391 | 84422 | */ |
| 84392 | | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *pBlob){ |
| 84423 | +SQLITE_API int SQLITE_APICALL sqlite3_blob_close(sqlite3_blob *pBlob){ |
| 84393 | 84424 | Incrblob *p = (Incrblob *)pBlob; |
| 84394 | 84425 | int rc; |
| 84395 | 84426 | sqlite3 *db; |
| 84396 | 84427 | |
| 84397 | 84428 | if( p ){ |
| | @@ -84480,28 +84511,28 @@ |
| 84480 | 84511 | } |
| 84481 | 84512 | |
| 84482 | 84513 | /* |
| 84483 | 84514 | ** Read data from a blob handle. |
| 84484 | 84515 | */ |
| 84485 | | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *pBlob, void *z, int n, int iOffset){ |
| 84516 | +SQLITE_API int SQLITE_APICALL sqlite3_blob_read(sqlite3_blob *pBlob, void *z, int n, int iOffset){ |
| 84486 | 84517 | return blobReadWrite(pBlob, z, n, iOffset, sqlite3BtreeData); |
| 84487 | 84518 | } |
| 84488 | 84519 | |
| 84489 | 84520 | /* |
| 84490 | 84521 | ** Write data to a blob handle. |
| 84491 | 84522 | */ |
| 84492 | | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *pBlob, const void *z, int n, int iOffset){ |
| 84523 | +SQLITE_API int SQLITE_APICALL sqlite3_blob_write(sqlite3_blob *pBlob, const void *z, int n, int iOffset){ |
| 84493 | 84524 | return blobReadWrite(pBlob, (void *)z, n, iOffset, sqlite3BtreePutData); |
| 84494 | 84525 | } |
| 84495 | 84526 | |
| 84496 | 84527 | /* |
| 84497 | 84528 | ** Query a blob handle for the size of the data. |
| 84498 | 84529 | ** |
| 84499 | 84530 | ** The Incrblob.nByte field is fixed for the lifetime of the Incrblob |
| 84500 | 84531 | ** so no mutex is required for access. |
| 84501 | 84532 | */ |
| 84502 | | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *pBlob){ |
| 84533 | +SQLITE_API int SQLITE_APICALL sqlite3_blob_bytes(sqlite3_blob *pBlob){ |
| 84503 | 84534 | Incrblob *p = (Incrblob *)pBlob; |
| 84504 | 84535 | return (p && p->pStmt) ? p->nByte : 0; |
| 84505 | 84536 | } |
| 84506 | 84537 | |
| 84507 | 84538 | /* |
| | @@ -84512,11 +84543,11 @@ |
| 84512 | 84543 | ** contain a blob or text value, then an error code is returned and the |
| 84513 | 84544 | ** database handle error code and message set. If this happens, then all |
| 84514 | 84545 | ** subsequent calls to sqlite3_blob_xxx() functions (except blob_close()) |
| 84515 | 84546 | ** immediately return SQLITE_ABORT. |
| 84516 | 84547 | */ |
| 84517 | | -SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){ |
| 84548 | +SQLITE_API int SQLITE_APICALL sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){ |
| 84518 | 84549 | int rc; |
| 84519 | 84550 | Incrblob *p = (Incrblob *)pBlob; |
| 84520 | 84551 | sqlite3 *db; |
| 84521 | 84552 | |
| 84522 | 84553 | if( p==0 ) return SQLITE_MISUSE_BKPT; |
| | @@ -93355,10 +93386,65 @@ |
| 93355 | 93386 | ){ |
| 93356 | 93387 | return 1; |
| 93357 | 93388 | } |
| 93358 | 93389 | return 0; |
| 93359 | 93390 | } |
| 93391 | + |
| 93392 | +/* |
| 93393 | +** An instance of the following structure is used by the tree walker |
| 93394 | +** to determine if an expression can be evaluated by reference to the |
| 93395 | +** index only, without having to do a search for the corresponding |
| 93396 | +** table entry. The IdxCover.pIdx field is the index. IdxCover.iCur |
| 93397 | +** is the cursor for the table. |
| 93398 | +*/ |
| 93399 | +struct IdxCover { |
| 93400 | + Index *pIdx; /* The index to be tested for coverage */ |
| 93401 | + int iCur; /* Cursor number for the table corresponding to the index */ |
| 93402 | +}; |
| 93403 | + |
| 93404 | +/* |
| 93405 | +** Check to see if there are references to columns in table |
| 93406 | +** pWalker->u.pIdxCover->iCur can be satisfied using the index |
| 93407 | +** pWalker->u.pIdxCover->pIdx. |
| 93408 | +*/ |
| 93409 | +static int exprIdxCover(Walker *pWalker, Expr *pExpr){ |
| 93410 | + if( pExpr->op==TK_COLUMN |
| 93411 | + && pExpr->iTable==pWalker->u.pIdxCover->iCur |
| 93412 | + && sqlite3ColumnOfIndex(pWalker->u.pIdxCover->pIdx, pExpr->iColumn)<0 |
| 93413 | + ){ |
| 93414 | + pWalker->eCode = 1; |
| 93415 | + return WRC_Abort; |
| 93416 | + } |
| 93417 | + return WRC_Continue; |
| 93418 | +} |
| 93419 | + |
| 93420 | +/* |
| 93421 | +** Determine if an index pIdx on table with cursor iCur contains will |
| 93422 | +** the expression pExpr. Return true if the index does cover the |
| 93423 | +** expression and false if the pExpr expression references table columns |
| 93424 | +** that are not found in the index pIdx. |
| 93425 | +** |
| 93426 | +** An index covering an expression means that the expression can be |
| 93427 | +** evaluated using only the index and without having to lookup the |
| 93428 | +** corresponding table entry. |
| 93429 | +*/ |
| 93430 | +SQLITE_PRIVATE int sqlite3ExprCoveredByIndex( |
| 93431 | + Expr *pExpr, /* The index to be tested */ |
| 93432 | + int iCur, /* The cursor number for the corresponding table */ |
| 93433 | + Index *pIdx /* The index that might be used for coverage */ |
| 93434 | +){ |
| 93435 | + Walker w; |
| 93436 | + struct IdxCover xcov; |
| 93437 | + memset(&w, 0, sizeof(w)); |
| 93438 | + xcov.iCur = iCur; |
| 93439 | + xcov.pIdx = pIdx; |
| 93440 | + w.xExprCallback = exprIdxCover; |
| 93441 | + w.u.pIdxCover = &xcov; |
| 93442 | + sqlite3WalkExpr(&w, pExpr); |
| 93443 | + return !w.eCode; |
| 93444 | +} |
| 93445 | + |
| 93360 | 93446 | |
| 93361 | 93447 | /* |
| 93362 | 93448 | ** An instance of the following structure is used by the tree walker |
| 93363 | 93449 | ** to count references to table columns in the arguments of an |
| 93364 | 93450 | ** aggregate function, in order to implement the |
| | @@ -97061,11 +97147,11 @@ |
| 97061 | 97147 | ** and attempts to write the column will be ignored. |
| 97062 | 97148 | ** |
| 97063 | 97149 | ** Setting the auth function to NULL disables this hook. The default |
| 97064 | 97150 | ** setting of the auth function is NULL. |
| 97065 | 97151 | */ |
| 97066 | | -SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer( |
| 97152 | +SQLITE_API int SQLITE_APICALL sqlite3_set_authorizer( |
| 97067 | 97153 | sqlite3 *db, |
| 97068 | 97154 | int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), |
| 97069 | 97155 | void *pArg |
| 97070 | 97156 | ){ |
| 97071 | 97157 | #ifdef SQLITE_ENABLE_API_ARMOR |
| | @@ -97105,10 +97191,11 @@ |
| 97105 | 97191 | ){ |
| 97106 | 97192 | sqlite3 *db = pParse->db; /* Database handle */ |
| 97107 | 97193 | char *zDb = db->aDb[iDb].zName; /* Name of attached database */ |
| 97108 | 97194 | int rc; /* Auth callback return code */ |
| 97109 | 97195 | |
| 97196 | + if( db->init.busy ) return SQLITE_OK; |
| 97110 | 97197 | rc = db->xAuth(db->pAuthArg, SQLITE_READ, zTab,zCol,zDb,pParse->zAuthContext |
| 97111 | 97198 | #ifdef SQLITE_USER_AUTHENTICATION |
| 97112 | 97199 | ,db->auth.zAuthUser |
| 97113 | 97200 | #endif |
| 97114 | 97201 | ); |
| | @@ -103823,18 +103910,18 @@ |
| 103823 | 103910 | } |
| 103824 | 103911 | |
| 103825 | 103912 | /* |
| 103826 | 103913 | ** The sqlite3_strglob() interface. |
| 103827 | 103914 | */ |
| 103828 | | -SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlobPattern, const char *zString){ |
| 103915 | +SQLITE_API int SQLITE_APICALL sqlite3_strglob(const char *zGlobPattern, const char *zString){ |
| 103829 | 103916 | return patternCompare((u8*)zGlobPattern, (u8*)zString, &globInfo, '[')==0; |
| 103830 | 103917 | } |
| 103831 | 103918 | |
| 103832 | 103919 | /* |
| 103833 | 103920 | ** The sqlite3_strlike() interface. |
| 103834 | 103921 | */ |
| 103835 | | -SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zPattern, const char *zStr, unsigned int esc){ |
| 103922 | +SQLITE_API int SQLITE_APICALL sqlite3_strlike(const char *zPattern, const char *zStr, unsigned int esc){ |
| 103836 | 103923 | return patternCompare((u8*)zPattern, (u8*)zStr, &likeInfoNorm, esc)==0; |
| 103837 | 103924 | } |
| 103838 | 103925 | |
| 103839 | 103926 | /* |
| 103840 | 103927 | ** Count the number of times that the LIKE operator (or GLOB which is |
| | @@ -108526,11 +108613,11 @@ |
| 108526 | 108613 | ** If the SQL is a query, then for each row in the query result |
| 108527 | 108614 | ** the xCallback() function is called. pArg becomes the first |
| 108528 | 108615 | ** argument to xCallback(). If xCallback=NULL then no callback |
| 108529 | 108616 | ** is invoked, even for queries. |
| 108530 | 108617 | */ |
| 108531 | | -SQLITE_API int SQLITE_STDCALL sqlite3_exec( |
| 108618 | +SQLITE_API int SQLITE_APICALL sqlite3_exec( |
| 108532 | 108619 | sqlite3 *db, /* The database on which the SQL executes */ |
| 108533 | 108620 | const char *zSql, /* The SQL to be executed */ |
| 108534 | 108621 | sqlite3_callback xCallback, /* Invoke this callback routine */ |
| 108535 | 108622 | void *pArg, /* First argument to xCallback() */ |
| 108536 | 108623 | char **pzErrMsg /* Write error messages here */ |
| | @@ -108685,12 +108772,10 @@ |
| 108685 | 108772 | */ |
| 108686 | 108773 | #ifndef SQLITE3EXT_H |
| 108687 | 108774 | #define SQLITE3EXT_H |
| 108688 | 108775 | /* #include "sqlite3.h" */ |
| 108689 | 108776 | |
| 108690 | | -typedef struct sqlite3_api_routines sqlite3_api_routines; |
| 108691 | | - |
| 108692 | 108777 | /* |
| 108693 | 108778 | ** The following structure holds pointers to all of the SQLite API |
| 108694 | 108779 | ** routines. |
| 108695 | 108780 | ** |
| 108696 | 108781 | ** WARNING: In order to maintain backwards compatibility, add new |
| | @@ -108951,10 +109036,20 @@ |
| 108951 | 109036 | int (*system_errno)(sqlite3*); |
| 108952 | 109037 | /* Version 3.14.0 and later */ |
| 108953 | 109038 | int (*trace_v2)(sqlite3*,unsigned,int(*)(unsigned,void*,void*,void*),void*); |
| 108954 | 109039 | char *(*expanded_sql)(sqlite3_stmt*); |
| 108955 | 109040 | }; |
| 109041 | + |
| 109042 | +/* |
| 109043 | +** This is the function signature used for all extension entry points. It |
| 109044 | +** is also defined in the file "loadext.c". |
| 109045 | +*/ |
| 109046 | +typedef int (*sqlite3_loadext_entry)( |
| 109047 | + sqlite3 *db, /* Handle to the database. */ |
| 109048 | + char **pzErrMsg, /* Used to set error string on failure. */ |
| 109049 | + const sqlite3_api_routines *pThunk /* Extension API function pointers. */ |
| 109050 | +); |
| 108956 | 109051 | |
| 108957 | 109052 | /* |
| 108958 | 109053 | ** The following macros redefine the API routines so that they are |
| 108959 | 109054 | ** redirected through the global sqlite3_api structure. |
| 108960 | 109055 | ** |
| | @@ -109223,11 +109318,10 @@ |
| 109223 | 109318 | /************** Continuing where we left off in loadext.c ********************/ |
| 109224 | 109319 | /* #include "sqliteInt.h" */ |
| 109225 | 109320 | /* #include <string.h> */ |
| 109226 | 109321 | |
| 109227 | 109322 | #ifndef SQLITE_OMIT_LOAD_EXTENSION |
| 109228 | | - |
| 109229 | 109323 | /* |
| 109230 | 109324 | ** Some API routines are omitted when various features are |
| 109231 | 109325 | ** excluded from a build of SQLite. Substitute a NULL pointer |
| 109232 | 109326 | ** for any missing APIs. |
| 109233 | 109327 | */ |
| | @@ -109312,10 +109406,14 @@ |
| 109312 | 109406 | #define sqlite3_blob_open 0 |
| 109313 | 109407 | #define sqlite3_blob_read 0 |
| 109314 | 109408 | #define sqlite3_blob_write 0 |
| 109315 | 109409 | #define sqlite3_blob_reopen 0 |
| 109316 | 109410 | #endif |
| 109411 | + |
| 109412 | +#if defined(SQLITE_OMIT_TRACE) |
| 109413 | +# define sqlite3_trace_v2 0 |
| 109414 | +#endif |
| 109317 | 109415 | |
| 109318 | 109416 | /* |
| 109319 | 109417 | ** The following structure contains pointers to all SQLite API routines. |
| 109320 | 109418 | ** A pointer to this structure is passed into extensions when they are |
| 109321 | 109419 | ** loaded so that the extension can make calls back into the SQLite |
| | @@ -109618,11 +109716,14 @@ |
| 109618 | 109716 | /* Version 3.10.0 and later */ |
| 109619 | 109717 | sqlite3_status64, |
| 109620 | 109718 | sqlite3_strlike, |
| 109621 | 109719 | sqlite3_db_cacheflush, |
| 109622 | 109720 | /* Version 3.12.0 and later */ |
| 109623 | | - sqlite3_system_errno |
| 109721 | + sqlite3_system_errno, |
| 109722 | + /* Version 3.14.0 and later */ |
| 109723 | + sqlite3_trace_v2, |
| 109724 | + sqlite3_expanded_sql |
| 109624 | 109725 | }; |
| 109625 | 109726 | |
| 109626 | 109727 | /* |
| 109627 | 109728 | ** Attempt to load an SQLite extension library contained in the file |
| 109628 | 109729 | ** zFile. The entry point is zProc. zProc may be 0 in which case a |
| | @@ -109641,11 +109742,11 @@ |
| 109641 | 109742 | const char *zProc, /* Entry point. Use "sqlite3_extension_init" if 0 */ |
| 109642 | 109743 | char **pzErrMsg /* Put error message here if not 0 */ |
| 109643 | 109744 | ){ |
| 109644 | 109745 | sqlite3_vfs *pVfs = db->pVfs; |
| 109645 | 109746 | void *handle; |
| 109646 | | - int (*xInit)(sqlite3*,char**,const sqlite3_api_routines*); |
| 109747 | + sqlite3_loadext_entry xInit; |
| 109647 | 109748 | char *zErrmsg = 0; |
| 109648 | 109749 | const char *zEntry; |
| 109649 | 109750 | char *zAltEntry = 0; |
| 109650 | 109751 | void **aHandle; |
| 109651 | 109752 | u64 nMsg = 300 + sqlite3Strlen30(zFile); |
| | @@ -109700,12 +109801,11 @@ |
| 109700 | 109801 | sqlite3OsDlError(pVfs, nMsg-1, zErrmsg); |
| 109701 | 109802 | } |
| 109702 | 109803 | } |
| 109703 | 109804 | return SQLITE_ERROR; |
| 109704 | 109805 | } |
| 109705 | | - xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*)) |
| 109706 | | - sqlite3OsDlSym(pVfs, handle, zEntry); |
| 109806 | + xInit = (sqlite3_loadext_entry)sqlite3OsDlSym(pVfs, handle, zEntry); |
| 109707 | 109807 | |
| 109708 | 109808 | /* If no entry point was specified and the default legacy |
| 109709 | 109809 | ** entry point name "sqlite3_extension_init" was not found, then |
| 109710 | 109810 | ** construct an entry point name "sqlite3_X_init" where the X is |
| 109711 | 109811 | ** replaced by the lowercase value of every ASCII alphabetic |
| | @@ -109733,12 +109833,11 @@ |
| 109733 | 109833 | zAltEntry[iEntry++] = (char)sqlite3UpperToLower[(unsigned)c]; |
| 109734 | 109834 | } |
| 109735 | 109835 | } |
| 109736 | 109836 | memcpy(zAltEntry+iEntry, "_init", 6); |
| 109737 | 109837 | zEntry = zAltEntry; |
| 109738 | | - xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*)) |
| 109739 | | - sqlite3OsDlSym(pVfs, handle, zEntry); |
| 109838 | + xInit = (sqlite3_loadext_entry)sqlite3OsDlSym(pVfs, handle, zEntry); |
| 109740 | 109839 | } |
| 109741 | 109840 | if( xInit==0 ){ |
| 109742 | 109841 | if( pzErrMsg ){ |
| 109743 | 109842 | nMsg += sqlite3Strlen30(zEntry); |
| 109744 | 109843 | *pzErrMsg = zErrmsg = sqlite3_malloc64(nMsg); |
| | @@ -109776,11 +109875,11 @@ |
| 109776 | 109875 | db->aExtension = aHandle; |
| 109777 | 109876 | |
| 109778 | 109877 | db->aExtension[db->nExtension++] = handle; |
| 109779 | 109878 | return SQLITE_OK; |
| 109780 | 109879 | } |
| 109781 | | -SQLITE_API int SQLITE_STDCALL sqlite3_load_extension( |
| 109880 | +SQLITE_API int SQLITE_APICALL sqlite3_load_extension( |
| 109782 | 109881 | sqlite3 *db, /* Load the extension into this database connection */ |
| 109783 | 109882 | const char *zFile, /* Name of the shared library containing extension */ |
| 109784 | 109883 | const char *zProc, /* Entry point. Use "sqlite3_extension_init" if 0 */ |
| 109785 | 109884 | char **pzErrMsg /* Put error message here if not 0 */ |
| 109786 | 109885 | ){ |
| | @@ -109807,11 +109906,11 @@ |
| 109807 | 109906 | |
| 109808 | 109907 | /* |
| 109809 | 109908 | ** Enable or disable extension loading. Extension loading is disabled by |
| 109810 | 109909 | ** default so as not to open security holes in older applications. |
| 109811 | 109910 | */ |
| 109812 | | -SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff){ |
| 109911 | +SQLITE_API int SQLITE_APICALL sqlite3_enable_load_extension(sqlite3 *db, int onoff){ |
| 109813 | 109912 | sqlite3_mutex_enter(db->mutex); |
| 109814 | 109913 | if( onoff ){ |
| 109815 | 109914 | db->flags |= SQLITE_LoadExtension|SQLITE_LoadExtFunc; |
| 109816 | 109915 | }else{ |
| 109817 | 109916 | db->flags &= ~(SQLITE_LoadExtension|SQLITE_LoadExtFunc); |
| | @@ -109864,11 +109963,13 @@ |
| 109864 | 109963 | |
| 109865 | 109964 | /* |
| 109866 | 109965 | ** Register a statically linked extension that is automatically |
| 109867 | 109966 | ** loaded by every new database connection. |
| 109868 | 109967 | */ |
| 109869 | | -SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void (*xInit)(void)){ |
| 109968 | +SQLITE_API int SQLITE_APICALL sqlite3_auto_extension( |
| 109969 | + void (*xInit)(void) |
| 109970 | +){ |
| 109870 | 109971 | int rc = SQLITE_OK; |
| 109871 | 109972 | #ifndef SQLITE_OMIT_AUTOINIT |
| 109872 | 109973 | rc = sqlite3_initialize(); |
| 109873 | 109974 | if( rc ){ |
| 109874 | 109975 | return rc; |
| | @@ -109909,11 +110010,13 @@ |
| 109909 | 110010 | ** routine is a no-op. |
| 109910 | 110011 | ** |
| 109911 | 110012 | ** Return 1 if xInit was found on the list and removed. Return 0 if xInit |
| 109912 | 110013 | ** was not on the list. |
| 109913 | 110014 | */ |
| 109914 | | -SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void (*xInit)(void)){ |
| 110015 | +SQLITE_API int SQLITE_APICALL sqlite3_cancel_auto_extension( |
| 110016 | + void (*xInit)(void) |
| 110017 | +){ |
| 109915 | 110018 | #if SQLITE_THREADSAFE |
| 109916 | 110019 | sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); |
| 109917 | 110020 | #endif |
| 109918 | 110021 | int i; |
| 109919 | 110022 | int n = 0; |
| | @@ -109932,11 +110035,11 @@ |
| 109932 | 110035 | } |
| 109933 | 110036 | |
| 109934 | 110037 | /* |
| 109935 | 110038 | ** Reset the automatic extension loading mechanism. |
| 109936 | 110039 | */ |
| 109937 | | -SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void){ |
| 110040 | +SQLITE_API void SQLITE_APICALL sqlite3_reset_auto_extension(void){ |
| 109938 | 110041 | #ifndef SQLITE_OMIT_AUTOINIT |
| 109939 | 110042 | if( sqlite3_initialize()==SQLITE_OK ) |
| 109940 | 110043 | #endif |
| 109941 | 110044 | { |
| 109942 | 110045 | #if SQLITE_THREADSAFE |
| | @@ -109958,11 +110061,11 @@ |
| 109958 | 110061 | */ |
| 109959 | 110062 | SQLITE_PRIVATE void sqlite3AutoLoadExtensions(sqlite3 *db){ |
| 109960 | 110063 | u32 i; |
| 109961 | 110064 | int go = 1; |
| 109962 | 110065 | int rc; |
| 109963 | | - int (*xInit)(sqlite3*,char**,const sqlite3_api_routines*); |
| 110066 | + sqlite3_loadext_entry xInit; |
| 109964 | 110067 | |
| 109965 | 110068 | wsdAutoextInit; |
| 109966 | 110069 | if( wsdAutoext.nExt==0 ){ |
| 109967 | 110070 | /* Common case: early out without every having to acquire a mutex */ |
| 109968 | 110071 | return; |
| | @@ -109975,12 +110078,11 @@ |
| 109975 | 110078 | sqlite3_mutex_enter(mutex); |
| 109976 | 110079 | if( i>=wsdAutoext.nExt ){ |
| 109977 | 110080 | xInit = 0; |
| 109978 | 110081 | go = 0; |
| 109979 | 110082 | }else{ |
| 109980 | | - xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*)) |
| 109981 | | - wsdAutoext.aExt[i]; |
| 110083 | + xInit = (sqlite3_loadext_entry)wsdAutoext.aExt[i]; |
| 109982 | 110084 | } |
| 109983 | 110085 | sqlite3_mutex_leave(mutex); |
| 109984 | 110086 | zErrmsg = 0; |
| 109985 | 110087 | if( xInit && (rc = xInit(db, &zErrmsg, &sqlite3Apis))!=0 ){ |
| 109986 | 110088 | sqlite3ErrorWithMsg(db, rc, |
| | @@ -113194,11 +113296,11 @@ |
| 113194 | 113296 | ** and so if a schema change occurs, SQLITE_SCHEMA is returned by |
| 113195 | 113297 | ** sqlite3_step(). In the new version, the original SQL text is retained |
| 113196 | 113298 | ** and the statement is automatically recompiled if an schema change |
| 113197 | 113299 | ** occurs. |
| 113198 | 113300 | */ |
| 113199 | | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare( |
| 113301 | +SQLITE_API int SQLITE_APICALL sqlite3_prepare( |
| 113200 | 113302 | sqlite3 *db, /* Database handle. */ |
| 113201 | 113303 | const char *zSql, /* UTF-8 encoded SQL statement. */ |
| 113202 | 113304 | int nBytes, /* Length of zSql in bytes. */ |
| 113203 | 113305 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 113204 | 113306 | const char **pzTail /* OUT: End of parsed string */ |
| | @@ -113206,11 +113308,11 @@ |
| 113206 | 113308 | int rc; |
| 113207 | 113309 | rc = sqlite3LockAndPrepare(db,zSql,nBytes,0,0,ppStmt,pzTail); |
| 113208 | 113310 | assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */ |
| 113209 | 113311 | return rc; |
| 113210 | 113312 | } |
| 113211 | | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2( |
| 113313 | +SQLITE_API int SQLITE_APICALL sqlite3_prepare_v2( |
| 113212 | 113314 | sqlite3 *db, /* Database handle. */ |
| 113213 | 113315 | const char *zSql, /* UTF-8 encoded SQL statement. */ |
| 113214 | 113316 | int nBytes, /* Length of zSql in bytes. */ |
| 113215 | 113317 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 113216 | 113318 | const char **pzTail /* OUT: End of parsed string */ |
| | @@ -113282,11 +113384,11 @@ |
| 113282 | 113384 | ** and so if a schema change occurs, SQLITE_SCHEMA is returned by |
| 113283 | 113385 | ** sqlite3_step(). In the new version, the original SQL text is retained |
| 113284 | 113386 | ** and the statement is automatically recompiled if an schema change |
| 113285 | 113387 | ** occurs. |
| 113286 | 113388 | */ |
| 113287 | | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare16( |
| 113389 | +SQLITE_API int SQLITE_APICALL sqlite3_prepare16( |
| 113288 | 113390 | sqlite3 *db, /* Database handle. */ |
| 113289 | 113391 | const void *zSql, /* UTF-16 encoded SQL statement. */ |
| 113290 | 113392 | int nBytes, /* Length of zSql in bytes. */ |
| 113291 | 113393 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 113292 | 113394 | const void **pzTail /* OUT: End of parsed string */ |
| | @@ -113294,11 +113396,11 @@ |
| 113294 | 113396 | int rc; |
| 113295 | 113397 | rc = sqlite3Prepare16(db,zSql,nBytes,0,ppStmt,pzTail); |
| 113296 | 113398 | assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */ |
| 113297 | 113399 | return rc; |
| 113298 | 113400 | } |
| 113299 | | -SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2( |
| 113401 | +SQLITE_API int SQLITE_APICALL sqlite3_prepare16_v2( |
| 113300 | 113402 | sqlite3 *db, /* Database handle. */ |
| 113301 | 113403 | const void *zSql, /* UTF-16 encoded SQL statement. */ |
| 113302 | 113404 | int nBytes, /* Length of zSql in bytes. */ |
| 113303 | 113405 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 113304 | 113406 | const void **pzTail /* OUT: End of parsed string */ |
| | @@ -119137,11 +119239,11 @@ |
| 119137 | 119239 | ** The result that is written to ***pazResult is held in memory obtained |
| 119138 | 119240 | ** from malloc(). But the caller cannot free this memory directly. |
| 119139 | 119241 | ** Instead, the entire table should be passed to sqlite3_free_table() when |
| 119140 | 119242 | ** the calling procedure is finished using it. |
| 119141 | 119243 | */ |
| 119142 | | -SQLITE_API int SQLITE_STDCALL sqlite3_get_table( |
| 119244 | +SQLITE_API int SQLITE_APICALL sqlite3_get_table( |
| 119143 | 119245 | sqlite3 *db, /* The database on which the SQL executes */ |
| 119144 | 119246 | const char *zSql, /* The SQL to be executed */ |
| 119145 | 119247 | char ***pazResult, /* Write the result table here */ |
| 119146 | 119248 | int *pnRow, /* Write the number of rows in the result here */ |
| 119147 | 119249 | int *pnColumn, /* Write the number of columns of result here */ |
| | @@ -119206,11 +119308,11 @@ |
| 119206 | 119308 | } |
| 119207 | 119309 | |
| 119208 | 119310 | /* |
| 119209 | 119311 | ** This routine frees the space the sqlite3_get_table() malloced. |
| 119210 | 119312 | */ |
| 119211 | | -SQLITE_API void SQLITE_STDCALL sqlite3_free_table( |
| 119313 | +SQLITE_API void SQLITE_APICALL sqlite3_free_table( |
| 119212 | 119314 | char **azResult /* Result returned from sqlite3_get_table() */ |
| 119213 | 119315 | ){ |
| 119214 | 119316 | if( azResult ){ |
| 119215 | 119317 | int i, n; |
| 119216 | 119318 | azResult--; |
| | @@ -121357,10 +121459,12 @@ |
| 121357 | 121459 | sqlite3CodecGetKey(db, 0, (void**)&zKey, &nKey); |
| 121358 | 121460 | if( nKey ) db->nextPagesize = 0; |
| 121359 | 121461 | } |
| 121360 | 121462 | #endif |
| 121361 | 121463 | |
| 121464 | + sqlite3BtreeSetCacheSize(pTemp, db->aDb[0].pSchema->cache_size); |
| 121465 | + sqlite3BtreeSetSpillSize(pTemp, sqlite3BtreeSetSpillSize(pMain,0)); |
| 121362 | 121466 | rc = execSql(db, pzErrMsg, "PRAGMA vacuum_db.synchronous=OFF"); |
| 121363 | 121467 | if( rc!=SQLITE_OK ) goto end_of_vacuum; |
| 121364 | 121468 | |
| 121365 | 121469 | /* Begin a transaction and take an exclusive lock on the main database |
| 121366 | 121470 | ** file. This is done before the sqlite3BtreeGetPageSize(pMain) call below, |
| | @@ -121614,11 +121718,11 @@ |
| 121614 | 121718 | |
| 121615 | 121719 | |
| 121616 | 121720 | /* |
| 121617 | 121721 | ** External API function used to create a new virtual-table module. |
| 121618 | 121722 | */ |
| 121619 | | -SQLITE_API int SQLITE_STDCALL sqlite3_create_module( |
| 121723 | +SQLITE_API int SQLITE_APICALL sqlite3_create_module( |
| 121620 | 121724 | sqlite3 *db, /* Database in which module is registered */ |
| 121621 | 121725 | const char *zName, /* Name assigned to this module */ |
| 121622 | 121726 | const sqlite3_module *pModule, /* The definition of the module */ |
| 121623 | 121727 | void *pAux /* Context pointer for xCreate/xConnect */ |
| 121624 | 121728 | ){ |
| | @@ -121629,11 +121733,11 @@ |
| 121629 | 121733 | } |
| 121630 | 121734 | |
| 121631 | 121735 | /* |
| 121632 | 121736 | ** External API function used to create a new virtual-table module. |
| 121633 | 121737 | */ |
| 121634 | | -SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2( |
| 121738 | +SQLITE_API int SQLITE_APICALL sqlite3_create_module_v2( |
| 121635 | 121739 | sqlite3 *db, /* Database in which module is registered */ |
| 121636 | 121740 | const char *zName, /* Name assigned to this module */ |
| 121637 | 121741 | const sqlite3_module *pModule, /* The definition of the module */ |
| 121638 | 121742 | void *pAux, /* Context pointer for xCreate/xConnect */ |
| 121639 | 121743 | void (*xDestroy)(void *) /* Module destructor function */ |
| | @@ -122253,11 +122357,11 @@ |
| 122253 | 122357 | /* |
| 122254 | 122358 | ** This function is used to set the schema of a virtual table. It is only |
| 122255 | 122359 | ** valid to call this function from within the xCreate() or xConnect() of a |
| 122256 | 122360 | ** virtual table module. |
| 122257 | 122361 | */ |
| 122258 | | -SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){ |
| 122362 | +SQLITE_API int SQLITE_APICALL sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){ |
| 122259 | 122363 | VtabCtx *pCtx; |
| 122260 | 122364 | Parse *pParse; |
| 122261 | 122365 | int rc = SQLITE_OK; |
| 122262 | 122366 | Table *pTab; |
| 122263 | 122367 | char *zErr = 0; |
| | @@ -122707,11 +122811,11 @@ |
| 122707 | 122811 | ** table update operation currently in progress. |
| 122708 | 122812 | ** |
| 122709 | 122813 | ** The results of this routine are undefined unless it is called from |
| 122710 | 122814 | ** within an xUpdate method. |
| 122711 | 122815 | */ |
| 122712 | | -SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *db){ |
| 122816 | +SQLITE_API int SQLITE_APICALL sqlite3_vtab_on_conflict(sqlite3 *db){ |
| 122713 | 122817 | static const unsigned char aMap[] = { |
| 122714 | 122818 | SQLITE_ROLLBACK, SQLITE_ABORT, SQLITE_FAIL, SQLITE_IGNORE, SQLITE_REPLACE |
| 122715 | 122819 | }; |
| 122716 | 122820 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 122717 | 122821 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| | @@ -124633,10 +124737,11 @@ |
| 124633 | 124737 | zStartAff[nEq] = SQLITE_AFF_BLOB; |
| 124634 | 124738 | } |
| 124635 | 124739 | } |
| 124636 | 124740 | nConstraint++; |
| 124637 | 124741 | testcase( pRangeStart->wtFlags & TERM_VIRTUAL ); |
| 124742 | + bSeekPastNull = 0; |
| 124638 | 124743 | }else if( bSeekPastNull ){ |
| 124639 | 124744 | sqlite3VdbeAddOp2(v, OP_Null, 0, regBase+nEq); |
| 124640 | 124745 | nConstraint++; |
| 124641 | 124746 | startEq = 0; |
| 124642 | 124747 | start_constraints = 1; |
| | @@ -129300,15 +129405,38 @@ |
| 129300 | 129405 | ){ |
| 129301 | 129406 | pNew->iSortIdx = b ? iSortIdx : 0; |
| 129302 | 129407 | |
| 129303 | 129408 | /* The cost of visiting the index rows is N*K, where K is |
| 129304 | 129409 | ** between 1.1 and 3.0, depending on the relative sizes of the |
| 129305 | | - ** index and table rows. If this is a non-covering index scan, |
| 129306 | | - ** also add the cost of visiting table rows (N*3.0). */ |
| 129410 | + ** index and table rows. */ |
| 129307 | 129411 | pNew->rRun = rSize + 1 + (15*pProbe->szIdxRow)/pTab->szTabRow; |
| 129308 | 129412 | if( m!=0 ){ |
| 129309 | | - pNew->rRun = sqlite3LogEstAdd(pNew->rRun, rSize+16); |
| 129413 | + /* If this is a non-covering index scan, add in the cost of |
| 129414 | + ** doing table lookups. The cost will be 3x the number of |
| 129415 | + ** lookups. Take into account WHERE clause terms that can be |
| 129416 | + ** satisfied using just the index, and that do not require a |
| 129417 | + ** table lookup. */ |
| 129418 | + LogEst nLookup = rSize + 16; /* Base cost: N*3 */ |
| 129419 | + int ii; |
| 129420 | + int iCur = pSrc->iCursor; |
| 129421 | + WhereClause *pWC2 = &pWInfo->sWC; |
| 129422 | + for(ii=0; ii<pWC2->nTerm; ii++){ |
| 129423 | + WhereTerm *pTerm = &pWC2->a[ii]; |
| 129424 | + if( !sqlite3ExprCoveredByIndex(pTerm->pExpr, iCur, pProbe) ){ |
| 129425 | + break; |
| 129426 | + } |
| 129427 | + /* pTerm can be evaluated using just the index. So reduce |
| 129428 | + ** the expected number of table lookups accordingly */ |
| 129429 | + if( pTerm->truthProb<=0 ){ |
| 129430 | + nLookup += pTerm->truthProb; |
| 129431 | + }else{ |
| 129432 | + nLookup--; |
| 129433 | + if( pTerm->eOperator & (WO_EQ|WO_IS) ) nLookup -= 19; |
| 129434 | + } |
| 129435 | + } |
| 129436 | + |
| 129437 | + pNew->rRun = sqlite3LogEstAdd(pNew->rRun, nLookup); |
| 129310 | 129438 | } |
| 129311 | 129439 | ApplyCostMultiplier(pNew->rRun, pTab->costMult); |
| 129312 | 129440 | whereLoopOutputAdjust(pWC, pNew, rSize); |
| 129313 | 129441 | rc = whereLoopInsert(pBuilder, pNew); |
| 129314 | 129442 | pNew->nOut = rSize; |
| | @@ -130474,11 +130602,11 @@ |
| 130474 | 130602 | pWInfo->nOBSat = pFrom->isOrdered; |
| 130475 | 130603 | pWInfo->revMask = pFrom->revLoop; |
| 130476 | 130604 | if( pWInfo->nOBSat<=0 ){ |
| 130477 | 130605 | pWInfo->nOBSat = 0; |
| 130478 | 130606 | if( nLoop>0 ){ |
| 130479 | | - Bitmask m; |
| 130607 | + Bitmask m = 0; |
| 130480 | 130608 | int rc = wherePathSatisfiesOrderBy(pWInfo, pWInfo->pOrderBy, pFrom, |
| 130481 | 130609 | WHERE_ORDERBY_LIMIT, nLoop-1, pFrom->aLoop[nLoop-1], &m); |
| 130482 | 130610 | if( rc==pWInfo->pOrderBy->nExpr ){ |
| 130483 | 130611 | pWInfo->bOrderedInnerLoop = 1; |
| 130484 | 130612 | pWInfo->revMask = m; |
| | @@ -136008,11 +136136,11 @@ |
| 136008 | 136136 | ** |
| 136009 | 136137 | ** If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed |
| 136010 | 136138 | ** to recognize the end of a trigger can be omitted. All we have to do |
| 136011 | 136139 | ** is look for a semicolon that is not part of an string or comment. |
| 136012 | 136140 | */ |
| 136013 | | -SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *zSql){ |
| 136141 | +SQLITE_API int SQLITE_APICALL sqlite3_complete(const char *zSql){ |
| 136014 | 136142 | u8 state = 0; /* Current state, using numbers defined in header comment */ |
| 136015 | 136143 | u8 token; /* Value of the next token */ |
| 136016 | 136144 | |
| 136017 | 136145 | #ifndef SQLITE_OMIT_TRIGGER |
| 136018 | 136146 | /* A complex statement machine used to detect the end of a CREATE TRIGGER |
| | @@ -136173,11 +136301,11 @@ |
| 136173 | 136301 | /* |
| 136174 | 136302 | ** This routine is the same as the sqlite3_complete() routine described |
| 136175 | 136303 | ** above, except that the parameter is required to be UTF-16 encoded, not |
| 136176 | 136304 | ** UTF-8. |
| 136177 | 136305 | */ |
| 136178 | | -SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *zSql){ |
| 136306 | +SQLITE_API int SQLITE_APICALL sqlite3_complete16(const void *zSql){ |
| 136179 | 136307 | sqlite3_value *pVal; |
| 136180 | 136308 | char const *zSql8; |
| 136181 | 136309 | int rc; |
| 136182 | 136310 | |
| 136183 | 136311 | #ifndef SQLITE_OMIT_AUTOINIT |
| | @@ -136333,28 +136461,28 @@ |
| 136333 | 136461 | #endif |
| 136334 | 136462 | |
| 136335 | 136463 | /* IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns |
| 136336 | 136464 | ** a pointer to the to the sqlite3_version[] string constant. |
| 136337 | 136465 | */ |
| 136338 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void){ return sqlite3_version; } |
| 136466 | +SQLITE_API const char *SQLITE_APICALL sqlite3_libversion(void){ return sqlite3_version; } |
| 136339 | 136467 | |
| 136340 | 136468 | /* IMPLEMENTATION-OF: R-63124-39300 The sqlite3_sourceid() function returns a |
| 136341 | 136469 | ** pointer to a string constant whose value is the same as the |
| 136342 | 136470 | ** SQLITE_SOURCE_ID C preprocessor macro. |
| 136343 | 136471 | */ |
| 136344 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; } |
| 136472 | +SQLITE_API const char *SQLITE_APICALL sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; } |
| 136345 | 136473 | |
| 136346 | 136474 | /* IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function |
| 136347 | 136475 | ** returns an integer equal to SQLITE_VERSION_NUMBER. |
| 136348 | 136476 | */ |
| 136349 | | -SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; } |
| 136477 | +SQLITE_API int SQLITE_APICALL sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; } |
| 136350 | 136478 | |
| 136351 | 136479 | /* IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns |
| 136352 | 136480 | ** zero if and only if SQLite was compiled with mutexing code omitted due to |
| 136353 | 136481 | ** the SQLITE_THREADSAFE compile-time option being set to 0. |
| 136354 | 136482 | */ |
| 136355 | | -SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; } |
| 136483 | +SQLITE_API int SQLITE_APICALL sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; } |
| 136356 | 136484 | |
| 136357 | 136485 | /* |
| 136358 | 136486 | ** When compiling the test fixture or with debugging enabled (on Win32), |
| 136359 | 136487 | ** this variable being set to non-zero will cause OSTRACE macros to emit |
| 136360 | 136488 | ** extra diagnostic information. |
| | @@ -136423,11 +136551,11 @@ |
| 136423 | 136551 | ** call by X completes. |
| 136424 | 136552 | ** |
| 136425 | 136553 | ** * Recursive calls to this routine from thread X return immediately |
| 136426 | 136554 | ** without blocking. |
| 136427 | 136555 | */ |
| 136428 | | -SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void){ |
| 136556 | +SQLITE_API int SQLITE_APICALL sqlite3_initialize(void){ |
| 136429 | 136557 | MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */ |
| 136430 | 136558 | int rc; /* Result code */ |
| 136431 | 136559 | #ifdef SQLITE_EXTRA_INIT |
| 136432 | 136560 | int bRunExtraInit = 0; /* Extra initialization needed */ |
| 136433 | 136561 | #endif |
| | @@ -136589,11 +136717,11 @@ |
| 136589 | 136717 | ** while any part of SQLite is otherwise in use in any thread. This |
| 136590 | 136718 | ** routine is not threadsafe. But it is safe to invoke this routine |
| 136591 | 136719 | ** on when SQLite is already shut down. If SQLite is already shut down |
| 136592 | 136720 | ** when this routine is invoked, then this routine is a harmless no-op. |
| 136593 | 136721 | */ |
| 136594 | | -SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void){ |
| 136722 | +SQLITE_API int SQLITE_APICALL sqlite3_shutdown(void){ |
| 136595 | 136723 | #ifdef SQLITE_OMIT_WSD |
| 136596 | 136724 | int rc = sqlite3_wsd_init(4096, 24); |
| 136597 | 136725 | if( rc!=SQLITE_OK ){ |
| 136598 | 136726 | return rc; |
| 136599 | 136727 | } |
| | @@ -137008,11 +137136,11 @@ |
| 137008 | 137136 | } |
| 137009 | 137137 | |
| 137010 | 137138 | /* |
| 137011 | 137139 | ** Return the mutex associated with a database connection. |
| 137012 | 137140 | */ |
| 137013 | | -SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3 *db){ |
| 137141 | +SQLITE_API sqlite3_mutex *SQLITE_APICALL sqlite3_db_mutex(sqlite3 *db){ |
| 137014 | 137142 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137015 | 137143 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137016 | 137144 | (void)SQLITE_MISUSE_BKPT; |
| 137017 | 137145 | return 0; |
| 137018 | 137146 | } |
| | @@ -137022,11 +137150,11 @@ |
| 137022 | 137150 | |
| 137023 | 137151 | /* |
| 137024 | 137152 | ** Free up as much memory as we can from the given database |
| 137025 | 137153 | ** connection. |
| 137026 | 137154 | */ |
| 137027 | | -SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3 *db){ |
| 137155 | +SQLITE_API int SQLITE_APICALL sqlite3_db_release_memory(sqlite3 *db){ |
| 137028 | 137156 | int i; |
| 137029 | 137157 | |
| 137030 | 137158 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137031 | 137159 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| 137032 | 137160 | #endif |
| | @@ -137046,11 +137174,11 @@ |
| 137046 | 137174 | |
| 137047 | 137175 | /* |
| 137048 | 137176 | ** Flush any dirty pages in the pager-cache for any attached database |
| 137049 | 137177 | ** to disk. |
| 137050 | 137178 | */ |
| 137051 | | -SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3 *db){ |
| 137179 | +SQLITE_API int SQLITE_APICALL sqlite3_db_cacheflush(sqlite3 *db){ |
| 137052 | 137180 | int i; |
| 137053 | 137181 | int rc = SQLITE_OK; |
| 137054 | 137182 | int bSeenBusy = 0; |
| 137055 | 137183 | |
| 137056 | 137184 | #ifdef SQLITE_ENABLE_API_ARMOR |
| | @@ -137196,11 +137324,11 @@ |
| 137196 | 137324 | } |
| 137197 | 137325 | |
| 137198 | 137326 | /* |
| 137199 | 137327 | ** Return the ROWID of the most recent insert |
| 137200 | 137328 | */ |
| 137201 | | -SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3 *db){ |
| 137329 | +SQLITE_API sqlite_int64 SQLITE_APICALL sqlite3_last_insert_rowid(sqlite3 *db){ |
| 137202 | 137330 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137203 | 137331 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137204 | 137332 | (void)SQLITE_MISUSE_BKPT; |
| 137205 | 137333 | return 0; |
| 137206 | 137334 | } |
| | @@ -137209,11 +137337,11 @@ |
| 137209 | 137337 | } |
| 137210 | 137338 | |
| 137211 | 137339 | /* |
| 137212 | 137340 | ** Return the number of changes in the most recent call to sqlite3_exec(). |
| 137213 | 137341 | */ |
| 137214 | | -SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3 *db){ |
| 137342 | +SQLITE_API int SQLITE_APICALL sqlite3_changes(sqlite3 *db){ |
| 137215 | 137343 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137216 | 137344 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137217 | 137345 | (void)SQLITE_MISUSE_BKPT; |
| 137218 | 137346 | return 0; |
| 137219 | 137347 | } |
| | @@ -137222,11 +137350,11 @@ |
| 137222 | 137350 | } |
| 137223 | 137351 | |
| 137224 | 137352 | /* |
| 137225 | 137353 | ** Return the number of changes since the database handle was opened. |
| 137226 | 137354 | */ |
| 137227 | | -SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3 *db){ |
| 137355 | +SQLITE_API int SQLITE_APICALL sqlite3_total_changes(sqlite3 *db){ |
| 137228 | 137356 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137229 | 137357 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137230 | 137358 | (void)SQLITE_MISUSE_BKPT; |
| 137231 | 137359 | return 0; |
| 137232 | 137360 | } |
| | @@ -137373,12 +137501,12 @@ |
| 137373 | 137501 | ** statements or unfinished sqlite3_backups. The sqlite3_close_v2() |
| 137374 | 137502 | ** version forces the connection to become a zombie if there are |
| 137375 | 137503 | ** unclosed resources, and arranges for deallocation when the last |
| 137376 | 137504 | ** prepare statement or sqlite3_backup closes. |
| 137377 | 137505 | */ |
| 137378 | | -SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3 *db){ return sqlite3Close(db,0); } |
| 137379 | | -SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3 *db){ return sqlite3Close(db,1); } |
| 137506 | +SQLITE_API int SQLITE_APICALL sqlite3_close(sqlite3 *db){ return sqlite3Close(db,0); } |
| 137507 | +SQLITE_API int SQLITE_APICALL sqlite3_close_v2(sqlite3 *db){ return sqlite3Close(db,1); } |
| 137380 | 137508 | |
| 137381 | 137509 | |
| 137382 | 137510 | /* |
| 137383 | 137511 | ** Close the mutex on database connection db. |
| 137384 | 137512 | ** |
| | @@ -137781,11 +137909,11 @@ |
| 137781 | 137909 | |
| 137782 | 137910 | /* |
| 137783 | 137911 | ** This routine sets the busy callback for an Sqlite database to the |
| 137784 | 137912 | ** given callback function with the given argument. |
| 137785 | 137913 | */ |
| 137786 | | -SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler( |
| 137914 | +SQLITE_API int SQLITE_APICALL sqlite3_busy_handler( |
| 137787 | 137915 | sqlite3 *db, |
| 137788 | 137916 | int (*xBusy)(void*,int), |
| 137789 | 137917 | void *pArg |
| 137790 | 137918 | ){ |
| 137791 | 137919 | #ifdef SQLITE_ENABLE_API_ARMOR |
| | @@ -137804,11 +137932,11 @@ |
| 137804 | 137932 | /* |
| 137805 | 137933 | ** This routine sets the progress callback for an Sqlite database to the |
| 137806 | 137934 | ** given callback function with the given argument. The progress callback will |
| 137807 | 137935 | ** be invoked every nOps opcodes. |
| 137808 | 137936 | */ |
| 137809 | | -SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler( |
| 137937 | +SQLITE_API void SQLITE_APICALL sqlite3_progress_handler( |
| 137810 | 137938 | sqlite3 *db, |
| 137811 | 137939 | int nOps, |
| 137812 | 137940 | int (*xProgress)(void*), |
| 137813 | 137941 | void *pArg |
| 137814 | 137942 | ){ |
| | @@ -137835,11 +137963,11 @@ |
| 137835 | 137963 | |
| 137836 | 137964 | /* |
| 137837 | 137965 | ** This routine installs a default busy handler that waits for the |
| 137838 | 137966 | ** specified number of milliseconds before returning 0. |
| 137839 | 137967 | */ |
| 137840 | | -SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3 *db, int ms){ |
| 137968 | +SQLITE_API int SQLITE_APICALL sqlite3_busy_timeout(sqlite3 *db, int ms){ |
| 137841 | 137969 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137842 | 137970 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| 137843 | 137971 | #endif |
| 137844 | 137972 | if( ms>0 ){ |
| 137845 | 137973 | sqlite3_busy_handler(db, sqliteDefaultBusyCallback, (void*)db); |
| | @@ -137851,11 +137979,11 @@ |
| 137851 | 137979 | } |
| 137852 | 137980 | |
| 137853 | 137981 | /* |
| 137854 | 137982 | ** Cause any pending operation to stop at its earliest opportunity. |
| 137855 | 137983 | */ |
| 137856 | | -SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3 *db){ |
| 137984 | +SQLITE_API void SQLITE_APICALL sqlite3_interrupt(sqlite3 *db){ |
| 137857 | 137985 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 137858 | 137986 | if( !sqlite3SafetyCheckOk(db) ){ |
| 137859 | 137987 | (void)SQLITE_MISUSE_BKPT; |
| 137860 | 137988 | return; |
| 137861 | 137989 | } |
| | @@ -137967,11 +138095,11 @@ |
| 137967 | 138095 | } |
| 137968 | 138096 | |
| 137969 | 138097 | /* |
| 137970 | 138098 | ** Create new user functions. |
| 137971 | 138099 | */ |
| 137972 | | -SQLITE_API int SQLITE_STDCALL sqlite3_create_function( |
| 138100 | +SQLITE_API int SQLITE_APICALL sqlite3_create_function( |
| 137973 | 138101 | sqlite3 *db, |
| 137974 | 138102 | const char *zFunc, |
| 137975 | 138103 | int nArg, |
| 137976 | 138104 | int enc, |
| 137977 | 138105 | void *p, |
| | @@ -137981,11 +138109,11 @@ |
| 137981 | 138109 | ){ |
| 137982 | 138110 | return sqlite3_create_function_v2(db, zFunc, nArg, enc, p, xSFunc, xStep, |
| 137983 | 138111 | xFinal, 0); |
| 137984 | 138112 | } |
| 137985 | 138113 | |
| 137986 | | -SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2( |
| 138114 | +SQLITE_API int SQLITE_APICALL sqlite3_create_function_v2( |
| 137987 | 138115 | sqlite3 *db, |
| 137988 | 138116 | const char *zFunc, |
| 137989 | 138117 | int nArg, |
| 137990 | 138118 | int enc, |
| 137991 | 138119 | void *p, |
| | @@ -138024,11 +138152,11 @@ |
| 138024 | 138152 | sqlite3_mutex_leave(db->mutex); |
| 138025 | 138153 | return rc; |
| 138026 | 138154 | } |
| 138027 | 138155 | |
| 138028 | 138156 | #ifndef SQLITE_OMIT_UTF16 |
| 138029 | | -SQLITE_API int SQLITE_STDCALL sqlite3_create_function16( |
| 138157 | +SQLITE_API int SQLITE_APICALL sqlite3_create_function16( |
| 138030 | 138158 | sqlite3 *db, |
| 138031 | 138159 | const void *zFunctionName, |
| 138032 | 138160 | int nArg, |
| 138033 | 138161 | int eTextRep, |
| 138034 | 138162 | void *p, |
| | @@ -138064,11 +138192,11 @@ |
| 138064 | 138192 | ** When virtual tables intend to provide an overloaded function, they |
| 138065 | 138193 | ** should call this routine to make sure the global function exists. |
| 138066 | 138194 | ** A global function must exist in order for name resolution to work |
| 138067 | 138195 | ** properly. |
| 138068 | 138196 | */ |
| 138069 | | -SQLITE_API int SQLITE_STDCALL sqlite3_overload_function( |
| 138197 | +SQLITE_API int SQLITE_APICALL sqlite3_overload_function( |
| 138070 | 138198 | sqlite3 *db, |
| 138071 | 138199 | const char *zName, |
| 138072 | 138200 | int nArg |
| 138073 | 138201 | ){ |
| 138074 | 138202 | int rc = SQLITE_OK; |
| | @@ -138096,11 +138224,11 @@ |
| 138096 | 138224 | ** A NULL trace function means that no tracing is executes. A non-NULL |
| 138097 | 138225 | ** trace is a pointer to a function that is invoked at the start of each |
| 138098 | 138226 | ** SQL statement. |
| 138099 | 138227 | */ |
| 138100 | 138228 | #ifndef SQLITE_OMIT_DEPRECATED |
| 138101 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_trace(sqlite3 *db, void(*xTrace)(void*,const char*), void *pArg){ |
| 138229 | +SQLITE_API void *SQLITE_APICALL sqlite3_trace(sqlite3 *db, void(*xTrace)(void*,const char*), void *pArg){ |
| 138102 | 138230 | void *pOld; |
| 138103 | 138231 | |
| 138104 | 138232 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 138105 | 138233 | if( !sqlite3SafetyCheckOk(db) ){ |
| 138106 | 138234 | (void)SQLITE_MISUSE_BKPT; |
| | @@ -138117,11 +138245,11 @@ |
| 138117 | 138245 | } |
| 138118 | 138246 | #endif /* SQLITE_OMIT_DEPRECATED */ |
| 138119 | 138247 | |
| 138120 | 138248 | /* Register a trace callback using the version-2 interface. |
| 138121 | 138249 | */ |
| 138122 | | -SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2( |
| 138250 | +SQLITE_API int SQLITE_APICALL sqlite3_trace_v2( |
| 138123 | 138251 | sqlite3 *db, /* Trace this connection */ |
| 138124 | 138252 | unsigned mTrace, /* Mask of events to be traced */ |
| 138125 | 138253 | int(*xTrace)(unsigned,void*,void*,void*), /* Callback to invoke */ |
| 138126 | 138254 | void *pArg /* Context */ |
| 138127 | 138255 | ){ |
| | @@ -138145,11 +138273,11 @@ |
| 138145 | 138273 | ** |
| 138146 | 138274 | ** A NULL profile function means that no profiling is executes. A non-NULL |
| 138147 | 138275 | ** profile is a pointer to a function that is invoked at the conclusion of |
| 138148 | 138276 | ** each SQL statement that is run. |
| 138149 | 138277 | */ |
| 138150 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_profile( |
| 138278 | +SQLITE_API void *SQLITE_APICALL sqlite3_profile( |
| 138151 | 138279 | sqlite3 *db, |
| 138152 | 138280 | void (*xProfile)(void*,const char*,sqlite_uint64), |
| 138153 | 138281 | void *pArg |
| 138154 | 138282 | ){ |
| 138155 | 138283 | void *pOld; |
| | @@ -138173,11 +138301,11 @@ |
| 138173 | 138301 | /* |
| 138174 | 138302 | ** Register a function to be invoked when a transaction commits. |
| 138175 | 138303 | ** If the invoked function returns non-zero, then the commit becomes a |
| 138176 | 138304 | ** rollback. |
| 138177 | 138305 | */ |
| 138178 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook( |
| 138306 | +SQLITE_API void *SQLITE_APICALL sqlite3_commit_hook( |
| 138179 | 138307 | sqlite3 *db, /* Attach the hook to this database */ |
| 138180 | 138308 | int (*xCallback)(void*), /* Function to invoke on each commit */ |
| 138181 | 138309 | void *pArg /* Argument to the function */ |
| 138182 | 138310 | ){ |
| 138183 | 138311 | void *pOld; |
| | @@ -138198,11 +138326,11 @@ |
| 138198 | 138326 | |
| 138199 | 138327 | /* |
| 138200 | 138328 | ** Register a callback to be invoked each time a row is updated, |
| 138201 | 138329 | ** inserted or deleted using this database connection. |
| 138202 | 138330 | */ |
| 138203 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook( |
| 138331 | +SQLITE_API void *SQLITE_APICALL sqlite3_update_hook( |
| 138204 | 138332 | sqlite3 *db, /* Attach the hook to this database */ |
| 138205 | 138333 | void (*xCallback)(void*,int,char const *,char const *,sqlite_int64), |
| 138206 | 138334 | void *pArg /* Argument to the function */ |
| 138207 | 138335 | ){ |
| 138208 | 138336 | void *pRet; |
| | @@ -138223,11 +138351,11 @@ |
| 138223 | 138351 | |
| 138224 | 138352 | /* |
| 138225 | 138353 | ** Register a callback to be invoked each time a transaction is rolled |
| 138226 | 138354 | ** back by this database connection. |
| 138227 | 138355 | */ |
| 138228 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook( |
| 138356 | +SQLITE_API void *SQLITE_APICALL sqlite3_rollback_hook( |
| 138229 | 138357 | sqlite3 *db, /* Attach the hook to this database */ |
| 138230 | 138358 | void (*xCallback)(void*), /* Callback function */ |
| 138231 | 138359 | void *pArg /* Argument to the function */ |
| 138232 | 138360 | ){ |
| 138233 | 138361 | void *pRet; |
| | @@ -138249,11 +138377,11 @@ |
| 138249 | 138377 | #ifdef SQLITE_ENABLE_PREUPDATE_HOOK |
| 138250 | 138378 | /* |
| 138251 | 138379 | ** Register a callback to be invoked each time a row is updated, |
| 138252 | 138380 | ** inserted or deleted using this database connection. |
| 138253 | 138381 | */ |
| 138254 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_preupdate_hook( |
| 138382 | +SQLITE_API void *SQLITE_APICALL sqlite3_preupdate_hook( |
| 138255 | 138383 | sqlite3 *db, /* Attach the hook to this database */ |
| 138256 | 138384 | void(*xCallback)( /* Callback function */ |
| 138257 | 138385 | void*,sqlite3*,int,char const*,char const*,sqlite3_int64,sqlite3_int64), |
| 138258 | 138386 | void *pArg /* First callback argument */ |
| 138259 | 138387 | ){ |
| | @@ -138298,11 +138426,11 @@ |
| 138298 | 138426 | ** The callback registered by this function replaces any existing callback |
| 138299 | 138427 | ** registered using sqlite3_wal_hook(). Likewise, registering a callback |
| 138300 | 138428 | ** using sqlite3_wal_hook() disables the automatic checkpoint mechanism |
| 138301 | 138429 | ** configured by this function. |
| 138302 | 138430 | */ |
| 138303 | | -SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){ |
| 138431 | +SQLITE_API int SQLITE_APICALL sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){ |
| 138304 | 138432 | #ifdef SQLITE_OMIT_WAL |
| 138305 | 138433 | UNUSED_PARAMETER(db); |
| 138306 | 138434 | UNUSED_PARAMETER(nFrame); |
| 138307 | 138435 | #else |
| 138308 | 138436 | #ifdef SQLITE_ENABLE_API_ARMOR |
| | @@ -138319,11 +138447,11 @@ |
| 138319 | 138447 | |
| 138320 | 138448 | /* |
| 138321 | 138449 | ** Register a callback to be invoked each time a transaction is written |
| 138322 | 138450 | ** into the write-ahead-log by this database connection. |
| 138323 | 138451 | */ |
| 138324 | | -SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook( |
| 138452 | +SQLITE_API void *SQLITE_APICALL sqlite3_wal_hook( |
| 138325 | 138453 | sqlite3 *db, /* Attach the hook to this db handle */ |
| 138326 | 138454 | int(*xCallback)(void *, sqlite3*, const char*, int), |
| 138327 | 138455 | void *pArg /* First argument passed to xCallback() */ |
| 138328 | 138456 | ){ |
| 138329 | 138457 | #ifndef SQLITE_OMIT_WAL |
| | @@ -138346,11 +138474,11 @@ |
| 138346 | 138474 | } |
| 138347 | 138475 | |
| 138348 | 138476 | /* |
| 138349 | 138477 | ** Checkpoint database zDb. |
| 138350 | 138478 | */ |
| 138351 | | -SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2( |
| 138479 | +SQLITE_API int SQLITE_APICALL sqlite3_wal_checkpoint_v2( |
| 138352 | 138480 | sqlite3 *db, /* Database handle */ |
| 138353 | 138481 | const char *zDb, /* Name of attached database (or NULL) */ |
| 138354 | 138482 | int eMode, /* SQLITE_CHECKPOINT_* value */ |
| 138355 | 138483 | int *pnLog, /* OUT: Size of WAL log in frames */ |
| 138356 | 138484 | int *pnCkpt /* OUT: Total number of frames checkpointed */ |
| | @@ -138401,11 +138529,11 @@ |
| 138401 | 138529 | /* |
| 138402 | 138530 | ** Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points |
| 138403 | 138531 | ** to contains a zero-length string, all attached databases are |
| 138404 | 138532 | ** checkpointed. |
| 138405 | 138533 | */ |
| 138406 | | -SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){ |
| 138534 | +SQLITE_API int SQLITE_APICALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){ |
| 138407 | 138535 | /* EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to |
| 138408 | 138536 | ** sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). */ |
| 138409 | 138537 | return sqlite3_wal_checkpoint_v2(db,zDb,SQLITE_CHECKPOINT_PASSIVE,0,0); |
| 138410 | 138538 | } |
| 138411 | 138539 | |
| | @@ -138492,11 +138620,11 @@ |
| 138492 | 138620 | |
| 138493 | 138621 | /* |
| 138494 | 138622 | ** Return UTF-8 encoded English language explanation of the most recent |
| 138495 | 138623 | ** error. |
| 138496 | 138624 | */ |
| 138497 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3 *db){ |
| 138625 | +SQLITE_API const char *SQLITE_APICALL sqlite3_errmsg(sqlite3 *db){ |
| 138498 | 138626 | const char *z; |
| 138499 | 138627 | if( !db ){ |
| 138500 | 138628 | return sqlite3ErrStr(SQLITE_NOMEM_BKPT); |
| 138501 | 138629 | } |
| 138502 | 138630 | if( !sqlite3SafetyCheckSickOrOk(db) ){ |
| | @@ -138520,11 +138648,11 @@ |
| 138520 | 138648 | #ifndef SQLITE_OMIT_UTF16 |
| 138521 | 138649 | /* |
| 138522 | 138650 | ** Return UTF-16 encoded English language explanation of the most recent |
| 138523 | 138651 | ** error. |
| 138524 | 138652 | */ |
| 138525 | | -SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3 *db){ |
| 138653 | +SQLITE_API const void *SQLITE_APICALL sqlite3_errmsg16(sqlite3 *db){ |
| 138526 | 138654 | static const u16 outOfMem[] = { |
| 138527 | 138655 | 'o', 'u', 't', ' ', 'o', 'f', ' ', 'm', 'e', 'm', 'o', 'r', 'y', 0 |
| 138528 | 138656 | }; |
| 138529 | 138657 | static const u16 misuse[] = { |
| 138530 | 138658 | 'l', 'i', 'b', 'r', 'a', 'r', 'y', ' ', |
| | @@ -138565,38 +138693,38 @@ |
| 138565 | 138693 | |
| 138566 | 138694 | /* |
| 138567 | 138695 | ** Return the most recent error code generated by an SQLite routine. If NULL is |
| 138568 | 138696 | ** passed to this function, we assume a malloc() failed during sqlite3_open(). |
| 138569 | 138697 | */ |
| 138570 | | -SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db){ |
| 138698 | +SQLITE_API int SQLITE_APICALL sqlite3_errcode(sqlite3 *db){ |
| 138571 | 138699 | if( db && !sqlite3SafetyCheckSickOrOk(db) ){ |
| 138572 | 138700 | return SQLITE_MISUSE_BKPT; |
| 138573 | 138701 | } |
| 138574 | 138702 | if( !db || db->mallocFailed ){ |
| 138575 | 138703 | return SQLITE_NOMEM_BKPT; |
| 138576 | 138704 | } |
| 138577 | 138705 | return db->errCode & db->errMask; |
| 138578 | 138706 | } |
| 138579 | | -SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db){ |
| 138707 | +SQLITE_API int SQLITE_APICALL sqlite3_extended_errcode(sqlite3 *db){ |
| 138580 | 138708 | if( db && !sqlite3SafetyCheckSickOrOk(db) ){ |
| 138581 | 138709 | return SQLITE_MISUSE_BKPT; |
| 138582 | 138710 | } |
| 138583 | 138711 | if( !db || db->mallocFailed ){ |
| 138584 | 138712 | return SQLITE_NOMEM_BKPT; |
| 138585 | 138713 | } |
| 138586 | 138714 | return db->errCode; |
| 138587 | 138715 | } |
| 138588 | | -SQLITE_API int SQLITE_STDCALL sqlite3_system_errno(sqlite3 *db){ |
| 138716 | +SQLITE_API int SQLITE_APICALL sqlite3_system_errno(sqlite3 *db){ |
| 138589 | 138717 | return db ? db->iSysErrno : 0; |
| 138590 | 138718 | } |
| 138591 | 138719 | |
| 138592 | 138720 | /* |
| 138593 | 138721 | ** Return a string that describes the kind of error specified in the |
| 138594 | 138722 | ** argument. For now, this simply calls the internal sqlite3ErrStr() |
| 138595 | 138723 | ** function. |
| 138596 | 138724 | */ |
| 138597 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int rc){ |
| 138725 | +SQLITE_API const char *SQLITE_APICALL sqlite3_errstr(int rc){ |
| 138598 | 138726 | return sqlite3ErrStr(rc); |
| 138599 | 138727 | } |
| 138600 | 138728 | |
| 138601 | 138729 | /* |
| 138602 | 138730 | ** Create a new collating function for database "db". The name is zName |
| | @@ -138740,11 +138868,11 @@ |
| 138740 | 138868 | ** |
| 138741 | 138869 | ** A new lower limit does not shrink existing constructs. |
| 138742 | 138870 | ** It merely prevents new constructs that exceed the limit |
| 138743 | 138871 | ** from forming. |
| 138744 | 138872 | */ |
| 138745 | | -SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3 *db, int limitId, int newLimit){ |
| 138873 | +SQLITE_API int SQLITE_APICALL sqlite3_limit(sqlite3 *db, int limitId, int newLimit){ |
| 138746 | 138874 | int oldLimit; |
| 138747 | 138875 | |
| 138748 | 138876 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 138749 | 138877 | if( !sqlite3SafetyCheckOk(db) ){ |
| 138750 | 138878 | (void)SQLITE_MISUSE_BKPT; |
| | @@ -139364,18 +139492,18 @@ |
| 139364 | 139492 | } |
| 139365 | 139493 | |
| 139366 | 139494 | /* |
| 139367 | 139495 | ** Open a new database handle. |
| 139368 | 139496 | */ |
| 139369 | | -SQLITE_API int SQLITE_STDCALL sqlite3_open( |
| 139497 | +SQLITE_API int SQLITE_APICALL sqlite3_open( |
| 139370 | 139498 | const char *zFilename, |
| 139371 | 139499 | sqlite3 **ppDb |
| 139372 | 139500 | ){ |
| 139373 | 139501 | return openDatabase(zFilename, ppDb, |
| 139374 | 139502 | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0); |
| 139375 | 139503 | } |
| 139376 | | -SQLITE_API int SQLITE_STDCALL sqlite3_open_v2( |
| 139504 | +SQLITE_API int SQLITE_APICALL sqlite3_open_v2( |
| 139377 | 139505 | const char *filename, /* Database filename (UTF-8) */ |
| 139378 | 139506 | sqlite3 **ppDb, /* OUT: SQLite db handle */ |
| 139379 | 139507 | int flags, /* Flags */ |
| 139380 | 139508 | const char *zVfs /* Name of VFS module to use */ |
| 139381 | 139509 | ){ |
| | @@ -139384,11 +139512,11 @@ |
| 139384 | 139512 | |
| 139385 | 139513 | #ifndef SQLITE_OMIT_UTF16 |
| 139386 | 139514 | /* |
| 139387 | 139515 | ** Open a new database handle. |
| 139388 | 139516 | */ |
| 139389 | | -SQLITE_API int SQLITE_STDCALL sqlite3_open16( |
| 139517 | +SQLITE_API int SQLITE_APICALL sqlite3_open16( |
| 139390 | 139518 | const void *zFilename, |
| 139391 | 139519 | sqlite3 **ppDb |
| 139392 | 139520 | ){ |
| 139393 | 139521 | char const *zFilename8; /* zFilename encoded in UTF-8 instead of UTF-16 */ |
| 139394 | 139522 | sqlite3_value *pVal; |
| | @@ -139423,11 +139551,11 @@ |
| 139423 | 139551 | #endif /* SQLITE_OMIT_UTF16 */ |
| 139424 | 139552 | |
| 139425 | 139553 | /* |
| 139426 | 139554 | ** Register a new collation sequence with the database handle db. |
| 139427 | 139555 | */ |
| 139428 | | -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation( |
| 139556 | +SQLITE_API int SQLITE_APICALL sqlite3_create_collation( |
| 139429 | 139557 | sqlite3* db, |
| 139430 | 139558 | const char *zName, |
| 139431 | 139559 | int enc, |
| 139432 | 139560 | void* pCtx, |
| 139433 | 139561 | int(*xCompare)(void*,int,const void*,int,const void*) |
| | @@ -139436,11 +139564,11 @@ |
| 139436 | 139564 | } |
| 139437 | 139565 | |
| 139438 | 139566 | /* |
| 139439 | 139567 | ** Register a new collation sequence with the database handle db. |
| 139440 | 139568 | */ |
| 139441 | | -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2( |
| 139569 | +SQLITE_API int SQLITE_APICALL sqlite3_create_collation_v2( |
| 139442 | 139570 | sqlite3* db, |
| 139443 | 139571 | const char *zName, |
| 139444 | 139572 | int enc, |
| 139445 | 139573 | void* pCtx, |
| 139446 | 139574 | int(*xCompare)(void*,int,const void*,int,const void*), |
| | @@ -139461,11 +139589,11 @@ |
| 139461 | 139589 | |
| 139462 | 139590 | #ifndef SQLITE_OMIT_UTF16 |
| 139463 | 139591 | /* |
| 139464 | 139592 | ** Register a new collation sequence with the database handle db. |
| 139465 | 139593 | */ |
| 139466 | | -SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16( |
| 139594 | +SQLITE_API int SQLITE_APICALL sqlite3_create_collation16( |
| 139467 | 139595 | sqlite3* db, |
| 139468 | 139596 | const void *zName, |
| 139469 | 139597 | int enc, |
| 139470 | 139598 | void* pCtx, |
| 139471 | 139599 | int(*xCompare)(void*,int,const void*,int,const void*) |
| | @@ -139491,11 +139619,11 @@ |
| 139491 | 139619 | |
| 139492 | 139620 | /* |
| 139493 | 139621 | ** Register a collation sequence factory callback with the database handle |
| 139494 | 139622 | ** db. Replace any previously installed collation sequence factory. |
| 139495 | 139623 | */ |
| 139496 | | -SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed( |
| 139624 | +SQLITE_API int SQLITE_APICALL sqlite3_collation_needed( |
| 139497 | 139625 | sqlite3 *db, |
| 139498 | 139626 | void *pCollNeededArg, |
| 139499 | 139627 | void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*) |
| 139500 | 139628 | ){ |
| 139501 | 139629 | #ifdef SQLITE_ENABLE_API_ARMOR |
| | @@ -139512,11 +139640,11 @@ |
| 139512 | 139640 | #ifndef SQLITE_OMIT_UTF16 |
| 139513 | 139641 | /* |
| 139514 | 139642 | ** Register a collation sequence factory callback with the database handle |
| 139515 | 139643 | ** db. Replace any previously installed collation sequence factory. |
| 139516 | 139644 | */ |
| 139517 | | -SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16( |
| 139645 | +SQLITE_API int SQLITE_APICALL sqlite3_collation_needed16( |
| 139518 | 139646 | sqlite3 *db, |
| 139519 | 139647 | void *pCollNeededArg, |
| 139520 | 139648 | void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*) |
| 139521 | 139649 | ){ |
| 139522 | 139650 | #ifdef SQLITE_ENABLE_API_ARMOR |
| | @@ -139534,11 +139662,11 @@ |
| 139534 | 139662 | #ifndef SQLITE_OMIT_DEPRECATED |
| 139535 | 139663 | /* |
| 139536 | 139664 | ** This function is now an anachronism. It used to be used to recover from a |
| 139537 | 139665 | ** malloc() failure, but SQLite now does this automatically. |
| 139538 | 139666 | */ |
| 139539 | | -SQLITE_API int SQLITE_STDCALL sqlite3_global_recover(void){ |
| 139667 | +SQLITE_API int SQLITE_APICALL sqlite3_global_recover(void){ |
| 139540 | 139668 | return SQLITE_OK; |
| 139541 | 139669 | } |
| 139542 | 139670 | #endif |
| 139543 | 139671 | |
| 139544 | 139672 | /* |
| | @@ -139545,11 +139673,11 @@ |
| 139545 | 139673 | ** Test to see whether or not the database connection is in autocommit |
| 139546 | 139674 | ** mode. Return TRUE if it is and FALSE if not. Autocommit mode is on |
| 139547 | 139675 | ** by default. Autocommit is disabled by a BEGIN statement and reenabled |
| 139548 | 139676 | ** by the next COMMIT or ROLLBACK. |
| 139549 | 139677 | */ |
| 139550 | | -SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3 *db){ |
| 139678 | +SQLITE_API int SQLITE_APICALL sqlite3_get_autocommit(sqlite3 *db){ |
| 139551 | 139679 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 139552 | 139680 | if( !sqlite3SafetyCheckOk(db) ){ |
| 139553 | 139681 | (void)SQLITE_MISUSE_BKPT; |
| 139554 | 139682 | return 0; |
| 139555 | 139683 | } |
| | @@ -139602,19 +139730,19 @@ |
| 139602 | 139730 | ** data for this thread has been deallocated. |
| 139603 | 139731 | ** |
| 139604 | 139732 | ** SQLite no longer uses thread-specific data so this routine is now a |
| 139605 | 139733 | ** no-op. It is retained for historical compatibility. |
| 139606 | 139734 | */ |
| 139607 | | -SQLITE_API void SQLITE_STDCALL sqlite3_thread_cleanup(void){ |
| 139735 | +SQLITE_API void SQLITE_APICALL sqlite3_thread_cleanup(void){ |
| 139608 | 139736 | } |
| 139609 | 139737 | #endif |
| 139610 | 139738 | |
| 139611 | 139739 | /* |
| 139612 | 139740 | ** Return meta information about a specific column of a database table. |
| 139613 | 139741 | ** See comment in sqlite3.h (sqlite.h.in) for details. |
| 139614 | 139742 | */ |
| 139615 | | -SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata( |
| 139743 | +SQLITE_API int SQLITE_APICALL sqlite3_table_column_metadata( |
| 139616 | 139744 | sqlite3 *db, /* Connection handle */ |
| 139617 | 139745 | const char *zDbName, /* Database name or NULL */ |
| 139618 | 139746 | const char *zTableName, /* Table name */ |
| 139619 | 139747 | const char *zColumnName, /* Column name */ |
| 139620 | 139748 | char const **pzDataType, /* OUTPUT: Declared data type */ |
| | @@ -139728,11 +139856,11 @@ |
| 139728 | 139856 | } |
| 139729 | 139857 | |
| 139730 | 139858 | /* |
| 139731 | 139859 | ** Sleep for a little while. Return the amount of time slept. |
| 139732 | 139860 | */ |
| 139733 | | -SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int ms){ |
| 139861 | +SQLITE_API int SQLITE_APICALL sqlite3_sleep(int ms){ |
| 139734 | 139862 | sqlite3_vfs *pVfs; |
| 139735 | 139863 | int rc; |
| 139736 | 139864 | pVfs = sqlite3_vfs_find(0); |
| 139737 | 139865 | if( pVfs==0 ) return 0; |
| 139738 | 139866 | |
| | @@ -139744,11 +139872,11 @@ |
| 139744 | 139872 | } |
| 139745 | 139873 | |
| 139746 | 139874 | /* |
| 139747 | 139875 | ** Enable or disable the extended result codes. |
| 139748 | 139876 | */ |
| 139749 | | -SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3 *db, int onoff){ |
| 139877 | +SQLITE_API int SQLITE_APICALL sqlite3_extended_result_codes(sqlite3 *db, int onoff){ |
| 139750 | 139878 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 139751 | 139879 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| 139752 | 139880 | #endif |
| 139753 | 139881 | sqlite3_mutex_enter(db->mutex); |
| 139754 | 139882 | db->errMask = onoff ? 0xffffffff : 0xff; |
| | @@ -139757,11 +139885,11 @@ |
| 139757 | 139885 | } |
| 139758 | 139886 | |
| 139759 | 139887 | /* |
| 139760 | 139888 | ** Invoke the xFileControl method on a particular database. |
| 139761 | 139889 | */ |
| 139762 | | -SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){ |
| 139890 | +SQLITE_API int SQLITE_APICALL sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){ |
| 139763 | 139891 | int rc = SQLITE_ERROR; |
| 139764 | 139892 | Btree *pBtree; |
| 139765 | 139893 | |
| 139766 | 139894 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 139767 | 139895 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| | @@ -140142,11 +140270,11 @@ |
| 140142 | 140270 | ** method of a VFS implementation. The zParam argument is the name of the |
| 140143 | 140271 | ** query parameter we seek. This routine returns the value of the zParam |
| 140144 | 140272 | ** parameter if it exists. If the parameter does not exist, this routine |
| 140145 | 140273 | ** returns a NULL pointer. |
| 140146 | 140274 | */ |
| 140147 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam){ |
| 140275 | +SQLITE_API const char *SQLITE_APICALL sqlite3_uri_parameter(const char *zFilename, const char *zParam){ |
| 140148 | 140276 | if( zFilename==0 || zParam==0 ) return 0; |
| 140149 | 140277 | zFilename += sqlite3Strlen30(zFilename) + 1; |
| 140150 | 140278 | while( zFilename[0] ){ |
| 140151 | 140279 | int x = strcmp(zFilename, zParam); |
| 140152 | 140280 | zFilename += sqlite3Strlen30(zFilename) + 1; |
| | @@ -140157,20 +140285,20 @@ |
| 140157 | 140285 | } |
| 140158 | 140286 | |
| 140159 | 140287 | /* |
| 140160 | 140288 | ** Return a boolean value for a query parameter. |
| 140161 | 140289 | */ |
| 140162 | | -SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFilename, const char *zParam, int bDflt){ |
| 140290 | +SQLITE_API int SQLITE_APICALL sqlite3_uri_boolean(const char *zFilename, const char *zParam, int bDflt){ |
| 140163 | 140291 | const char *z = sqlite3_uri_parameter(zFilename, zParam); |
| 140164 | 140292 | bDflt = bDflt!=0; |
| 140165 | 140293 | return z ? sqlite3GetBoolean(z, bDflt) : bDflt; |
| 140166 | 140294 | } |
| 140167 | 140295 | |
| 140168 | 140296 | /* |
| 140169 | 140297 | ** Return a 64-bit integer value for a query parameter. |
| 140170 | 140298 | */ |
| 140171 | | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64( |
| 140299 | +SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3_uri_int64( |
| 140172 | 140300 | const char *zFilename, /* Filename as passed to xOpen */ |
| 140173 | 140301 | const char *zParam, /* URI parameter sought */ |
| 140174 | 140302 | sqlite3_int64 bDflt /* return if parameter is missing */ |
| 140175 | 140303 | ){ |
| 140176 | 140304 | const char *z = sqlite3_uri_parameter(zFilename, zParam); |
| | @@ -140198,11 +140326,11 @@ |
| 140198 | 140326 | |
| 140199 | 140327 | /* |
| 140200 | 140328 | ** Return the filename of the database associated with a database |
| 140201 | 140329 | ** connection. |
| 140202 | 140330 | */ |
| 140203 | | -SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName){ |
| 140331 | +SQLITE_API const char *SQLITE_APICALL sqlite3_db_filename(sqlite3 *db, const char *zDbName){ |
| 140204 | 140332 | Btree *pBt; |
| 140205 | 140333 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 140206 | 140334 | if( !sqlite3SafetyCheckOk(db) ){ |
| 140207 | 140335 | (void)SQLITE_MISUSE_BKPT; |
| 140208 | 140336 | return 0; |
| | @@ -140214,11 +140342,11 @@ |
| 140214 | 140342 | |
| 140215 | 140343 | /* |
| 140216 | 140344 | ** Return 1 if database is read-only or 0 if read/write. Return -1 if |
| 140217 | 140345 | ** no such database exists. |
| 140218 | 140346 | */ |
| 140219 | | -SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName){ |
| 140347 | +SQLITE_API int SQLITE_APICALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName){ |
| 140220 | 140348 | Btree *pBt; |
| 140221 | 140349 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 140222 | 140350 | if( !sqlite3SafetyCheckOk(db) ){ |
| 140223 | 140351 | (void)SQLITE_MISUSE_BKPT; |
| 140224 | 140352 | return -1; |
| | @@ -140231,11 +140359,11 @@ |
| 140231 | 140359 | #ifdef SQLITE_ENABLE_SNAPSHOT |
| 140232 | 140360 | /* |
| 140233 | 140361 | ** Obtain a snapshot handle for the snapshot of database zDb currently |
| 140234 | 140362 | ** being read by handle db. |
| 140235 | 140363 | */ |
| 140236 | | -SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_get( |
| 140364 | +SQLITE_API int SQLITE_APICALL sqlite3_snapshot_get( |
| 140237 | 140365 | sqlite3 *db, |
| 140238 | 140366 | const char *zDb, |
| 140239 | 140367 | sqlite3_snapshot **ppSnapshot |
| 140240 | 140368 | ){ |
| 140241 | 140369 | int rc = SQLITE_ERROR; |
| | @@ -140266,11 +140394,11 @@ |
| 140266 | 140394 | } |
| 140267 | 140395 | |
| 140268 | 140396 | /* |
| 140269 | 140397 | ** Open a read-transaction on the snapshot idendified by pSnapshot. |
| 140270 | 140398 | */ |
| 140271 | | -SQLITE_API int SQLITE_STDCALL sqlite3_snapshot_open( |
| 140399 | +SQLITE_API int SQLITE_APICALL sqlite3_snapshot_open( |
| 140272 | 140400 | sqlite3 *db, |
| 140273 | 140401 | const char *zDb, |
| 140274 | 140402 | sqlite3_snapshot *pSnapshot |
| 140275 | 140403 | ){ |
| 140276 | 140404 | int rc = SQLITE_ERROR; |
| | @@ -140303,11 +140431,11 @@ |
| 140303 | 140431 | } |
| 140304 | 140432 | |
| 140305 | 140433 | /* |
| 140306 | 140434 | ** Free a snapshot handle obtained from sqlite3_snapshot_get(). |
| 140307 | 140435 | */ |
| 140308 | | -SQLITE_API void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot *pSnapshot){ |
| 140436 | +SQLITE_API void SQLITE_APICALL sqlite3_snapshot_free(sqlite3_snapshot *pSnapshot){ |
| 140309 | 140437 | sqlite3_free(pSnapshot); |
| 140310 | 140438 | } |
| 140311 | 140439 | #endif /* SQLITE_ENABLE_SNAPSHOT */ |
| 140312 | 140440 | |
| 140313 | 140441 | /************** End of main.c ************************************************/ |
| | @@ -140457,11 +140585,11 @@ |
| 140457 | 140585 | ** |
| 140458 | 140586 | ** Each call to this routine overrides any prior callbacks registered |
| 140459 | 140587 | ** on the same "db". If xNotify==0 then any prior callbacks are immediately |
| 140460 | 140588 | ** cancelled. |
| 140461 | 140589 | */ |
| 140462 | | -SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify( |
| 140590 | +SQLITE_API int SQLITE_APICALL sqlite3_unlock_notify( |
| 140463 | 140591 | sqlite3 *db, |
| 140464 | 140592 | void (*xNotify)(void **, int), |
| 140465 | 140593 | void *pArg |
| 140466 | 140594 | ){ |
| 140467 | 140595 | int rc = SQLITE_OK; |
| | @@ -147460,11 +147588,11 @@ |
| 147460 | 147588 | ** Initialize API pointer table, if required. |
| 147461 | 147589 | */ |
| 147462 | 147590 | #ifdef _WIN32 |
| 147463 | 147591 | __declspec(dllexport) |
| 147464 | 147592 | #endif |
| 147465 | | -SQLITE_API int SQLITE_STDCALL sqlite3_fts3_init( |
| 147593 | +SQLITE_API int SQLITE_APICALL sqlite3_fts3_init( |
| 147466 | 147594 | sqlite3 *db, |
| 147467 | 147595 | char **pzErrMsg, |
| 147468 | 147596 | const sqlite3_api_routines *pApi |
| 147469 | 147597 | ){ |
| 147470 | 147598 | SQLITE_EXTENSION_INIT2(pApi) |
| | @@ -150616,11 +150744,15 @@ |
| 150616 | 150744 | } |
| 150617 | 150745 | |
| 150618 | 150746 | |
| 150619 | 150747 | #ifdef SQLITE_TEST |
| 150620 | 150748 | |
| 150621 | | -#include <tcl.h> |
| 150749 | +#if defined(INCLUDE_SQLITE_TCL_H) |
| 150750 | +# include "sqlite_tcl.h" |
| 150751 | +#else |
| 150752 | +# include "tcl.h" |
| 150753 | +#endif |
| 150622 | 150754 | /* #include <string.h> */ |
| 150623 | 150755 | |
| 150624 | 150756 | /* |
| 150625 | 150757 | ** Implementation of a special SQL scalar function for testing tokenizers |
| 150626 | 150758 | ** designed to be used in concert with the Tcl testing framework. This |
| | @@ -163257,11 +163389,11 @@ |
| 163257 | 163389 | } |
| 163258 | 163390 | |
| 163259 | 163391 | /* |
| 163260 | 163392 | ** Register a new geometry function for use with the r-tree MATCH operator. |
| 163261 | 163393 | */ |
| 163262 | | -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback( |
| 163394 | +SQLITE_API int SQLITE_APICALL sqlite3_rtree_geometry_callback( |
| 163263 | 163395 | sqlite3 *db, /* Register SQL function on this connection */ |
| 163264 | 163396 | const char *zGeom, /* Name of the new SQL function */ |
| 163265 | 163397 | int (*xGeom)(sqlite3_rtree_geometry*,int,RtreeDValue*,int*), /* Callback */ |
| 163266 | 163398 | void *pContext /* Extra data associated with the callback */ |
| 163267 | 163399 | ){ |
| | @@ -163281,11 +163413,11 @@ |
| 163281 | 163413 | |
| 163282 | 163414 | /* |
| 163283 | 163415 | ** Register a new 2nd-generation geometry function for use with the |
| 163284 | 163416 | ** r-tree MATCH operator. |
| 163285 | 163417 | */ |
| 163286 | | -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback( |
| 163418 | +SQLITE_API int SQLITE_APICALL sqlite3_rtree_query_callback( |
| 163287 | 163419 | sqlite3 *db, /* Register SQL function on this connection */ |
| 163288 | 163420 | const char *zQueryFunc, /* Name of new SQL function */ |
| 163289 | 163421 | int (*xQueryFunc)(sqlite3_rtree_query_info*), /* Callback */ |
| 163290 | 163422 | void *pContext, /* Extra data passed into the callback */ |
| 163291 | 163423 | void (*xDestructor)(void*) /* Destructor for the extra data */ |
| | @@ -163306,11 +163438,11 @@ |
| 163306 | 163438 | |
| 163307 | 163439 | #if !SQLITE_CORE |
| 163308 | 163440 | #ifdef _WIN32 |
| 163309 | 163441 | __declspec(dllexport) |
| 163310 | 163442 | #endif |
| 163311 | | -SQLITE_API int SQLITE_STDCALL sqlite3_rtree_init( |
| 163443 | +SQLITE_API int SQLITE_APICALL sqlite3_rtree_init( |
| 163312 | 163444 | sqlite3 *db, |
| 163313 | 163445 | char **pzErrMsg, |
| 163314 | 163446 | const sqlite3_api_routines *pApi |
| 163315 | 163447 | ){ |
| 163316 | 163448 | SQLITE_EXTENSION_INIT2(pApi) |
| | @@ -163857,11 +163989,11 @@ |
| 163857 | 163989 | |
| 163858 | 163990 | #if !SQLITE_CORE |
| 163859 | 163991 | #ifdef _WIN32 |
| 163860 | 163992 | __declspec(dllexport) |
| 163861 | 163993 | #endif |
| 163862 | | -SQLITE_API int SQLITE_STDCALL sqlite3_icu_init( |
| 163994 | +SQLITE_API int SQLITE_APICALL sqlite3_icu_init( |
| 163863 | 163995 | sqlite3 *db, |
| 163864 | 163996 | char **pzErrMsg, |
| 163865 | 163997 | const sqlite3_api_routines *pApi |
| 163866 | 163998 | ){ |
| 163867 | 163999 | SQLITE_EXTENSION_INIT2(pApi) |
| | @@ -164537,11 +164669,11 @@ |
| 164537 | 164669 | ** IMPORTANT NOTE FOR ZIPVFS USERS: The RBU extension works with all of |
| 164538 | 164670 | ** SQLite's built-in VFSs, including the multiplexor VFS. However it does |
| 164539 | 164671 | ** not work out of the box with zipvfs. Refer to the comment describing |
| 164540 | 164672 | ** the zipvfs_create_vfs() API below for details on using RBU with zipvfs. |
| 164541 | 164673 | */ |
| 164542 | | -SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_open( |
| 164674 | +SQLITE_API sqlite3rbu *SQLITE_APICALL sqlite3rbu_open( |
| 164543 | 164675 | const char *zTarget, |
| 164544 | 164676 | const char *zRbu, |
| 164545 | 164677 | const char *zState |
| 164546 | 164678 | ); |
| 164547 | 164679 | |
| | @@ -164570,11 +164702,11 @@ |
| 164570 | 164702 | ** As with sqlite3rbu_open(), Zipvfs users should rever to the comment |
| 164571 | 164703 | ** describing the sqlite3rbu_create_vfs() API function below for |
| 164572 | 164704 | ** a description of the complications associated with using RBU with |
| 164573 | 164705 | ** zipvfs databases. |
| 164574 | 164706 | */ |
| 164575 | | -SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_vacuum( |
| 164707 | +SQLITE_API sqlite3rbu *SQLITE_APICALL sqlite3rbu_vacuum( |
| 164576 | 164708 | const char *zTarget, |
| 164577 | 164709 | const char *zState |
| 164578 | 164710 | ); |
| 164579 | 164711 | |
| 164580 | 164712 | /* |
| | @@ -164606,11 +164738,11 @@ |
| 164606 | 164738 | ** when sqlite3rbu_close() is called. |
| 164607 | 164739 | ** |
| 164608 | 164740 | ** Database handles returned by this function remain valid until the next |
| 164609 | 164741 | ** call to any sqlite3rbu_xxx() function other than sqlite3rbu_db(). |
| 164610 | 164742 | */ |
| 164611 | | -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3rbu_db(sqlite3rbu*, int bRbu); |
| 164743 | +SQLITE_API sqlite3 *SQLITE_APICALL sqlite3rbu_db(sqlite3rbu*, int bRbu); |
| 164612 | 164744 | |
| 164613 | 164745 | /* |
| 164614 | 164746 | ** Do some work towards applying the RBU update to the target db. |
| 164615 | 164747 | ** |
| 164616 | 164748 | ** Return SQLITE_DONE if the update has been completely applied, or |
| | @@ -164620,11 +164752,11 @@ |
| 164620 | 164752 | ** |
| 164621 | 164753 | ** Once a call to sqlite3rbu_step() has returned a value other than |
| 164622 | 164754 | ** SQLITE_OK, all subsequent calls on the same RBU handle are no-ops |
| 164623 | 164755 | ** that immediately return the same value. |
| 164624 | 164756 | */ |
| 164625 | | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_step(sqlite3rbu *pRbu); |
| 164757 | +SQLITE_API int SQLITE_APICALL sqlite3rbu_step(sqlite3rbu *pRbu); |
| 164626 | 164758 | |
| 164627 | 164759 | /* |
| 164628 | 164760 | ** Force RBU to save its state to disk. |
| 164629 | 164761 | ** |
| 164630 | 164762 | ** If a power failure or application crash occurs during an update, following |
| | @@ -164632,11 +164764,11 @@ |
| 164632 | 164764 | ** was last saved. In other words, from the most recent successful call to |
| 164633 | 164765 | ** sqlite3rbu_close() or this function. |
| 164634 | 164766 | ** |
| 164635 | 164767 | ** SQLITE_OK is returned if successful, or an SQLite error code otherwise. |
| 164636 | 164768 | */ |
| 164637 | | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_savestate(sqlite3rbu *pRbu); |
| 164769 | +SQLITE_API int SQLITE_APICALL sqlite3rbu_savestate(sqlite3rbu *pRbu); |
| 164638 | 164770 | |
| 164639 | 164771 | /* |
| 164640 | 164772 | ** Close an RBU handle. |
| 164641 | 164773 | ** |
| 164642 | 164774 | ** If the RBU update has been completely applied, mark the RBU database |
| | @@ -164652,18 +164784,18 @@ |
| 164652 | 164784 | ** |
| 164653 | 164785 | ** Otherwise, if no error occurs, this function returns SQLITE_OK if the |
| 164654 | 164786 | ** update has been partially applied, or SQLITE_DONE if it has been |
| 164655 | 164787 | ** completely applied. |
| 164656 | 164788 | */ |
| 164657 | | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_close(sqlite3rbu *pRbu, char **pzErrmsg); |
| 164789 | +SQLITE_API int SQLITE_APICALL sqlite3rbu_close(sqlite3rbu *pRbu, char **pzErrmsg); |
| 164658 | 164790 | |
| 164659 | 164791 | /* |
| 164660 | 164792 | ** Return the total number of key-value operations (inserts, deletes or |
| 164661 | 164793 | ** updates) that have been performed on the target database since the |
| 164662 | 164794 | ** current RBU update was started. |
| 164663 | 164795 | */ |
| 164664 | | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3rbu_progress(sqlite3rbu *pRbu); |
| 164796 | +SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3rbu_progress(sqlite3rbu *pRbu); |
| 164665 | 164797 | |
| 164666 | 164798 | /* |
| 164667 | 164799 | ** Obtain permyriadage (permyriadage is to 10000 as percentage is to 100) |
| 164668 | 164800 | ** progress indications for the two stages of an RBU update. This API may |
| 164669 | 164801 | ** be useful for driving GUI progress indicators and similar. |
| | @@ -164701,11 +164833,11 @@ |
| 164701 | 164833 | ** permyriadage progress of the same stage. If the rbu_count table does |
| 164702 | 164834 | ** not exist, then (*pnOne) is set to -1 during stage 1. If the rbu_count |
| 164703 | 164835 | ** table exists but is not correctly populated, the value of the *pnOne |
| 164704 | 164836 | ** output variable during stage 1 is undefined. |
| 164705 | 164837 | */ |
| 164706 | | -SQLITE_API void SQLITE_STDCALL sqlite3rbu_bp_progress(sqlite3rbu *pRbu, int *pnOne, int *pnTwo); |
| 164838 | +SQLITE_API void SQLITE_APICALL sqlite3rbu_bp_progress(sqlite3rbu *pRbu, int *pnOne, int *pnTwo); |
| 164707 | 164839 | |
| 164708 | 164840 | /* |
| 164709 | 164841 | ** Obtain an indication as to the current stage of an RBU update or vacuum. |
| 164710 | 164842 | ** This function always returns one of the SQLITE_RBU_STATE_XXX constants |
| 164711 | 164843 | ** defined in this file. Return values should be interpreted as follows: |
| | @@ -164739,11 +164871,11 @@ |
| 164739 | 164871 | #define SQLITE_RBU_STATE_MOVE 2 |
| 164740 | 164872 | #define SQLITE_RBU_STATE_CHECKPOINT 3 |
| 164741 | 164873 | #define SQLITE_RBU_STATE_DONE 4 |
| 164742 | 164874 | #define SQLITE_RBU_STATE_ERROR 5 |
| 164743 | 164875 | |
| 164744 | | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_state(sqlite3rbu *pRbu); |
| 164876 | +SQLITE_API int SQLITE_APICALL sqlite3rbu_state(sqlite3rbu *pRbu); |
| 164745 | 164877 | |
| 164746 | 164878 | /* |
| 164747 | 164879 | ** Create an RBU VFS named zName that accesses the underlying file-system |
| 164748 | 164880 | ** via existing VFS zParent. Or, if the zParent parameter is passed NULL, |
| 164749 | 164881 | ** then the new RBU VFS uses the default system VFS to access the file-system. |
| | @@ -164783,21 +164915,21 @@ |
| 164783 | 164915 | ** The overhead of adding the "rbu" VFS to the system is negligible for |
| 164784 | 164916 | ** non-RBU users. There is no harm in an application accessing the |
| 164785 | 164917 | ** file-system via "rbu" all the time, even if it only uses RBU functionality |
| 164786 | 164918 | ** occasionally. |
| 164787 | 164919 | */ |
| 164788 | | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_create_vfs(const char *zName, const char *zParent); |
| 164920 | +SQLITE_API int SQLITE_APICALL sqlite3rbu_create_vfs(const char *zName, const char *zParent); |
| 164789 | 164921 | |
| 164790 | 164922 | /* |
| 164791 | 164923 | ** Deregister and destroy an RBU vfs created by an earlier call to |
| 164792 | 164924 | ** sqlite3rbu_create_vfs(). |
| 164793 | 164925 | ** |
| 164794 | 164926 | ** VFS objects are not reference counted. If a VFS object is destroyed |
| 164795 | 164927 | ** before all database handles that use it have been closed, the results |
| 164796 | 164928 | ** are undefined. |
| 164797 | 164929 | */ |
| 164798 | | -SQLITE_API void SQLITE_STDCALL sqlite3rbu_destroy_vfs(const char *zName); |
| 164930 | +SQLITE_API void SQLITE_APICALL sqlite3rbu_destroy_vfs(const char *zName); |
| 164799 | 164931 | |
| 164800 | 164932 | #if 0 |
| 164801 | 164933 | } /* end of the 'extern "C"' block */ |
| 164802 | 164934 | #endif |
| 164803 | 164935 | |
| | @@ -167887,11 +168019,11 @@ |
| 167887 | 168019 | } |
| 167888 | 168020 | |
| 167889 | 168021 | /* |
| 167890 | 168022 | ** Step the RBU object. |
| 167891 | 168023 | */ |
| 167892 | | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_step(sqlite3rbu *p){ |
| 168024 | +SQLITE_API int SQLITE_APICALL sqlite3rbu_step(sqlite3rbu *p){ |
| 167893 | 168025 | if( p ){ |
| 167894 | 168026 | switch( p->eStage ){ |
| 167895 | 168027 | case RBU_STAGE_OAL: { |
| 167896 | 168028 | RbuObjIter *pIter = &p->objiter; |
| 167897 | 168029 | |
| | @@ -168329,11 +168461,11 @@ |
| 168329 | 168461 | } |
| 168330 | 168462 | |
| 168331 | 168463 | /* |
| 168332 | 168464 | ** Open and return a new RBU handle. |
| 168333 | 168465 | */ |
| 168334 | | -SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_open( |
| 168466 | +SQLITE_API sqlite3rbu *SQLITE_APICALL sqlite3rbu_open( |
| 168335 | 168467 | const char *zTarget, |
| 168336 | 168468 | const char *zRbu, |
| 168337 | 168469 | const char *zState |
| 168338 | 168470 | ){ |
| 168339 | 168471 | /* TODO: Check that zTarget and zRbu are non-NULL */ |
| | @@ -168341,11 +168473,11 @@ |
| 168341 | 168473 | } |
| 168342 | 168474 | |
| 168343 | 168475 | /* |
| 168344 | 168476 | ** Open a handle to begin or resume an RBU VACUUM operation. |
| 168345 | 168477 | */ |
| 168346 | | -SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_vacuum( |
| 168478 | +SQLITE_API sqlite3rbu *SQLITE_APICALL sqlite3rbu_vacuum( |
| 168347 | 168479 | const char *zTarget, |
| 168348 | 168480 | const char *zState |
| 168349 | 168481 | ){ |
| 168350 | 168482 | /* TODO: Check that both arguments are non-NULL */ |
| 168351 | 168483 | return openRbuHandle(0, zTarget, zState); |
| | @@ -168352,11 +168484,11 @@ |
| 168352 | 168484 | } |
| 168353 | 168485 | |
| 168354 | 168486 | /* |
| 168355 | 168487 | ** Return the database handle used by pRbu. |
| 168356 | 168488 | */ |
| 168357 | | -SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3rbu_db(sqlite3rbu *pRbu, int bRbu){ |
| 168489 | +SQLITE_API sqlite3 *SQLITE_APICALL sqlite3rbu_db(sqlite3rbu *pRbu, int bRbu){ |
| 168358 | 168490 | sqlite3 *db = 0; |
| 168359 | 168491 | if( pRbu ){ |
| 168360 | 168492 | db = (bRbu ? pRbu->dbRbu : pRbu->dbMain); |
| 168361 | 168493 | } |
| 168362 | 168494 | return db; |
| | @@ -168384,11 +168516,11 @@ |
| 168384 | 168516 | } |
| 168385 | 168517 | |
| 168386 | 168518 | /* |
| 168387 | 168519 | ** Close the RBU handle. |
| 168388 | 168520 | */ |
| 168389 | | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_close(sqlite3rbu *p, char **pzErrmsg){ |
| 168521 | +SQLITE_API int SQLITE_APICALL sqlite3rbu_close(sqlite3rbu *p, char **pzErrmsg){ |
| 168390 | 168522 | int rc; |
| 168391 | 168523 | if( p ){ |
| 168392 | 168524 | |
| 168393 | 168525 | /* Commit the transaction to the *-oal file. */ |
| 168394 | 168526 | if( p->rc==SQLITE_OK && p->eStage==RBU_STAGE_OAL ){ |
| | @@ -168435,19 +168567,19 @@ |
| 168435 | 168567 | /* |
| 168436 | 168568 | ** Return the total number of key-value operations (inserts, deletes or |
| 168437 | 168569 | ** updates) that have been performed on the target database since the |
| 168438 | 168570 | ** current RBU update was started. |
| 168439 | 168571 | */ |
| 168440 | | -SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3rbu_progress(sqlite3rbu *pRbu){ |
| 168572 | +SQLITE_API sqlite3_int64 SQLITE_APICALL sqlite3rbu_progress(sqlite3rbu *pRbu){ |
| 168441 | 168573 | return pRbu->nProgress; |
| 168442 | 168574 | } |
| 168443 | 168575 | |
| 168444 | 168576 | /* |
| 168445 | 168577 | ** Return permyriadage progress indications for the two main stages of |
| 168446 | 168578 | ** an RBU update. |
| 168447 | 168579 | */ |
| 168448 | | -SQLITE_API void SQLITE_STDCALL sqlite3rbu_bp_progress(sqlite3rbu *p, int *pnOne, int *pnTwo){ |
| 168580 | +SQLITE_API void SQLITE_APICALL sqlite3rbu_bp_progress(sqlite3rbu *p, int *pnOne, int *pnTwo){ |
| 168449 | 168581 | const int MAX_PROGRESS = 10000; |
| 168450 | 168582 | switch( p->eStage ){ |
| 168451 | 168583 | case RBU_STAGE_OAL: |
| 168452 | 168584 | if( p->nPhaseOneStep>0 ){ |
| 168453 | 168585 | *pnOne = (int)(MAX_PROGRESS * (i64)p->nProgress/(i64)p->nPhaseOneStep); |
| | @@ -168478,11 +168610,11 @@ |
| 168478 | 168610 | } |
| 168479 | 168611 | |
| 168480 | 168612 | /* |
| 168481 | 168613 | ** Return the current state of the RBU vacuum or update operation. |
| 168482 | 168614 | */ |
| 168483 | | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_state(sqlite3rbu *p){ |
| 168615 | +SQLITE_API int SQLITE_APICALL sqlite3rbu_state(sqlite3rbu *p){ |
| 168484 | 168616 | int aRes[] = { |
| 168485 | 168617 | 0, SQLITE_RBU_STATE_OAL, SQLITE_RBU_STATE_MOVE, |
| 168486 | 168618 | 0, SQLITE_RBU_STATE_CHECKPOINT, SQLITE_RBU_STATE_DONE |
| 168487 | 168619 | }; |
| 168488 | 168620 | |
| | @@ -168506,11 +168638,11 @@ |
| 168506 | 168638 | ); |
| 168507 | 168639 | return aRes[p->eStage]; |
| 168508 | 168640 | } |
| 168509 | 168641 | } |
| 168510 | 168642 | |
| 168511 | | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_savestate(sqlite3rbu *p){ |
| 168643 | +SQLITE_API int SQLITE_APICALL sqlite3rbu_savestate(sqlite3rbu *p){ |
| 168512 | 168644 | int rc = p->rc; |
| 168513 | 168645 | if( rc==SQLITE_DONE ) return SQLITE_OK; |
| 168514 | 168646 | |
| 168515 | 168647 | assert( p->eStage>=RBU_STAGE_OAL && p->eStage<=RBU_STAGE_DONE ); |
| 168516 | 168648 | if( p->eStage==RBU_STAGE_OAL ){ |
| | @@ -169333,11 +169465,11 @@ |
| 169333 | 169465 | |
| 169334 | 169466 | /* |
| 169335 | 169467 | ** Deregister and destroy an RBU vfs created by an earlier call to |
| 169336 | 169468 | ** sqlite3rbu_create_vfs(). |
| 169337 | 169469 | */ |
| 169338 | | -SQLITE_API void SQLITE_STDCALL sqlite3rbu_destroy_vfs(const char *zName){ |
| 169470 | +SQLITE_API void SQLITE_APICALL sqlite3rbu_destroy_vfs(const char *zName){ |
| 169339 | 169471 | sqlite3_vfs *pVfs = sqlite3_vfs_find(zName); |
| 169340 | 169472 | if( pVfs && pVfs->xOpen==rbuVfsOpen ){ |
| 169341 | 169473 | sqlite3_mutex_free(((rbu_vfs*)pVfs)->mutex); |
| 169342 | 169474 | sqlite3_vfs_unregister(pVfs); |
| 169343 | 169475 | sqlite3_free(pVfs); |
| | @@ -169347,11 +169479,11 @@ |
| 169347 | 169479 | /* |
| 169348 | 169480 | ** Create an RBU VFS named zName that accesses the underlying file-system |
| 169349 | 169481 | ** via existing VFS zParent. The new object is registered as a non-default |
| 169350 | 169482 | ** VFS with SQLite before returning. |
| 169351 | 169483 | */ |
| 169352 | | -SQLITE_API int SQLITE_STDCALL sqlite3rbu_create_vfs(const char *zName, const char *zParent){ |
| 169484 | +SQLITE_API int SQLITE_APICALL sqlite3rbu_create_vfs(const char *zName, const char *zParent){ |
| 169353 | 169485 | |
| 169354 | 169486 | /* Template for VFS */ |
| 169355 | 169487 | static sqlite3_vfs vfs_template = { |
| 169356 | 169488 | 1, /* iVersion */ |
| 169357 | 169489 | 0, /* szOsFile */ |
| | @@ -171592,11 +171724,11 @@ |
| 171592 | 171724 | } |
| 171593 | 171725 | |
| 171594 | 171726 | return rc; |
| 171595 | 171727 | } |
| 171596 | 171728 | |
| 171597 | | -SQLITE_API int SQLITE_STDCALL sqlite3session_diff( |
| 171729 | +SQLITE_API int SQLITE_APICALL sqlite3session_diff( |
| 171598 | 171730 | sqlite3_session *pSession, |
| 171599 | 171731 | const char *zFrom, |
| 171600 | 171732 | const char *zTbl, |
| 171601 | 171733 | char **pzErrMsg |
| 171602 | 171734 | ){ |
| | @@ -171686,11 +171818,11 @@ |
| 171686 | 171818 | |
| 171687 | 171819 | /* |
| 171688 | 171820 | ** Create a session object. This session object will record changes to |
| 171689 | 171821 | ** database zDb attached to connection db. |
| 171690 | 171822 | */ |
| 171691 | | -SQLITE_API int SQLITE_STDCALL sqlite3session_create( |
| 171823 | +SQLITE_API int SQLITE_APICALL sqlite3session_create( |
| 171692 | 171824 | sqlite3 *db, /* Database handle */ |
| 171693 | 171825 | const char *zDb, /* Name of db (e.g. "main") */ |
| 171694 | 171826 | sqlite3_session **ppSession /* OUT: New session object */ |
| 171695 | 171827 | ){ |
| 171696 | 171828 | sqlite3_session *pNew; /* Newly allocated session object */ |
| | @@ -171748,11 +171880,11 @@ |
| 171748 | 171880 | } |
| 171749 | 171881 | |
| 171750 | 171882 | /* |
| 171751 | 171883 | ** Delete a session object previously allocated using sqlite3session_create(). |
| 171752 | 171884 | */ |
| 171753 | | -SQLITE_API void SQLITE_STDCALL sqlite3session_delete(sqlite3_session *pSession){ |
| 171885 | +SQLITE_API void SQLITE_APICALL sqlite3session_delete(sqlite3_session *pSession){ |
| 171754 | 171886 | sqlite3 *db = pSession->db; |
| 171755 | 171887 | sqlite3_session *pHead; |
| 171756 | 171888 | sqlite3_session **pp; |
| 171757 | 171889 | |
| 171758 | 171890 | /* Unlink the session from the linked list of sessions attached to the |
| | @@ -171777,11 +171909,11 @@ |
| 171777 | 171909 | } |
| 171778 | 171910 | |
| 171779 | 171911 | /* |
| 171780 | 171912 | ** Set a table filter on a Session Object. |
| 171781 | 171913 | */ |
| 171782 | | -SQLITE_API void SQLITE_STDCALL sqlite3session_table_filter( |
| 171914 | +SQLITE_API void SQLITE_APICALL sqlite3session_table_filter( |
| 171783 | 171915 | sqlite3_session *pSession, |
| 171784 | 171916 | int(*xFilter)(void*, const char*), |
| 171785 | 171917 | void *pCtx /* First argument passed to xFilter */ |
| 171786 | 171918 | ){ |
| 171787 | 171919 | pSession->bAutoAttach = 1; |
| | @@ -171795,11 +171927,11 @@ |
| 171795 | 171927 | ** |
| 171796 | 171928 | ** Only tables that have a PRIMARY KEY defined may be attached. It does |
| 171797 | 171929 | ** not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias) |
| 171798 | 171930 | ** or not. |
| 171799 | 171931 | */ |
| 171800 | | -SQLITE_API int SQLITE_STDCALL sqlite3session_attach( |
| 171932 | +SQLITE_API int SQLITE_APICALL sqlite3session_attach( |
| 171801 | 171933 | sqlite3_session *pSession, /* Session object */ |
| 171802 | 171934 | const char *zName /* Table name */ |
| 171803 | 171935 | ){ |
| 171804 | 171936 | int rc = SQLITE_OK; |
| 171805 | 171937 | sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); |
| | @@ -172485,11 +172617,11 @@ |
| 172485 | 172617 | ** session object passed as the first argument. |
| 172486 | 172618 | ** |
| 172487 | 172619 | ** It is the responsibility of the caller to eventually free the buffer |
| 172488 | 172620 | ** using sqlite3_free(). |
| 172489 | 172621 | */ |
| 172490 | | -SQLITE_API int SQLITE_STDCALL sqlite3session_changeset( |
| 172622 | +SQLITE_API int SQLITE_APICALL sqlite3session_changeset( |
| 172491 | 172623 | sqlite3_session *pSession, /* Session object */ |
| 172492 | 172624 | int *pnChangeset, /* OUT: Size of buffer at *ppChangeset */ |
| 172493 | 172625 | void **ppChangeset /* OUT: Buffer containing changeset */ |
| 172494 | 172626 | ){ |
| 172495 | 172627 | return sessionGenerateChangeset(pSession, 0, 0, 0, pnChangeset, ppChangeset); |
| | @@ -172496,11 +172628,11 @@ |
| 172496 | 172628 | } |
| 172497 | 172629 | |
| 172498 | 172630 | /* |
| 172499 | 172631 | ** Streaming version of sqlite3session_changeset(). |
| 172500 | 172632 | */ |
| 172501 | | -SQLITE_API int SQLITE_STDCALL sqlite3session_changeset_strm( |
| 172633 | +SQLITE_API int SQLITE_APICALL sqlite3session_changeset_strm( |
| 172502 | 172634 | sqlite3_session *pSession, |
| 172503 | 172635 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 172504 | 172636 | void *pOut |
| 172505 | 172637 | ){ |
| 172506 | 172638 | return sessionGenerateChangeset(pSession, 0, xOutput, pOut, 0, 0); |
| | @@ -172507,11 +172639,11 @@ |
| 172507 | 172639 | } |
| 172508 | 172640 | |
| 172509 | 172641 | /* |
| 172510 | 172642 | ** Streaming version of sqlite3session_patchset(). |
| 172511 | 172643 | */ |
| 172512 | | -SQLITE_API int SQLITE_STDCALL sqlite3session_patchset_strm( |
| 172644 | +SQLITE_API int SQLITE_APICALL sqlite3session_patchset_strm( |
| 172513 | 172645 | sqlite3_session *pSession, |
| 172514 | 172646 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 172515 | 172647 | void *pOut |
| 172516 | 172648 | ){ |
| 172517 | 172649 | return sessionGenerateChangeset(pSession, 1, xOutput, pOut, 0, 0); |
| | @@ -172522,11 +172654,11 @@ |
| 172522 | 172654 | ** session object passed as the first argument. |
| 172523 | 172655 | ** |
| 172524 | 172656 | ** It is the responsibility of the caller to eventually free the buffer |
| 172525 | 172657 | ** using sqlite3_free(). |
| 172526 | 172658 | */ |
| 172527 | | -SQLITE_API int SQLITE_STDCALL sqlite3session_patchset( |
| 172659 | +SQLITE_API int SQLITE_APICALL sqlite3session_patchset( |
| 172528 | 172660 | sqlite3_session *pSession, /* Session object */ |
| 172529 | 172661 | int *pnPatchset, /* OUT: Size of buffer at *ppChangeset */ |
| 172530 | 172662 | void **ppPatchset /* OUT: Buffer containing changeset */ |
| 172531 | 172663 | ){ |
| 172532 | 172664 | return sessionGenerateChangeset(pSession, 1, 0, 0, pnPatchset, ppPatchset); |
| | @@ -172533,11 +172665,11 @@ |
| 172533 | 172665 | } |
| 172534 | 172666 | |
| 172535 | 172667 | /* |
| 172536 | 172668 | ** Enable or disable the session object passed as the first argument. |
| 172537 | 172669 | */ |
| 172538 | | -SQLITE_API int SQLITE_STDCALL sqlite3session_enable(sqlite3_session *pSession, int bEnable){ |
| 172670 | +SQLITE_API int SQLITE_APICALL sqlite3session_enable(sqlite3_session *pSession, int bEnable){ |
| 172539 | 172671 | int ret; |
| 172540 | 172672 | sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); |
| 172541 | 172673 | if( bEnable>=0 ){ |
| 172542 | 172674 | pSession->bEnable = bEnable; |
| 172543 | 172675 | } |
| | @@ -172547,11 +172679,11 @@ |
| 172547 | 172679 | } |
| 172548 | 172680 | |
| 172549 | 172681 | /* |
| 172550 | 172682 | ** Enable or disable the session object passed as the first argument. |
| 172551 | 172683 | */ |
| 172552 | | -SQLITE_API int SQLITE_STDCALL sqlite3session_indirect(sqlite3_session *pSession, int bIndirect){ |
| 172684 | +SQLITE_API int SQLITE_APICALL sqlite3session_indirect(sqlite3_session *pSession, int bIndirect){ |
| 172553 | 172685 | int ret; |
| 172554 | 172686 | sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); |
| 172555 | 172687 | if( bIndirect>=0 ){ |
| 172556 | 172688 | pSession->bIndirect = bIndirect; |
| 172557 | 172689 | } |
| | @@ -172562,11 +172694,11 @@ |
| 172562 | 172694 | |
| 172563 | 172695 | /* |
| 172564 | 172696 | ** Return true if there have been no changes to monitored tables recorded |
| 172565 | 172697 | ** by the session object passed as the only argument. |
| 172566 | 172698 | */ |
| 172567 | | -SQLITE_API int SQLITE_STDCALL sqlite3session_isempty(sqlite3_session *pSession){ |
| 172699 | +SQLITE_API int SQLITE_APICALL sqlite3session_isempty(sqlite3_session *pSession){ |
| 172568 | 172700 | int ret = 0; |
| 172569 | 172701 | SessionTable *pTab; |
| 172570 | 172702 | |
| 172571 | 172703 | sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db)); |
| 172572 | 172704 | for(pTab=pSession->pTable; pTab && ret==0; pTab=pTab->pNext){ |
| | @@ -172612,11 +172744,11 @@ |
| 172612 | 172744 | } |
| 172613 | 172745 | |
| 172614 | 172746 | /* |
| 172615 | 172747 | ** Create an iterator used to iterate through the contents of a changeset. |
| 172616 | 172748 | */ |
| 172617 | | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_start( |
| 172749 | +SQLITE_API int SQLITE_APICALL sqlite3changeset_start( |
| 172618 | 172750 | sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */ |
| 172619 | 172751 | int nChangeset, /* Size of buffer pChangeset in bytes */ |
| 172620 | 172752 | void *pChangeset /* Pointer to buffer containing changeset */ |
| 172621 | 172753 | ){ |
| 172622 | 172754 | return sessionChangesetStart(pp, 0, 0, nChangeset, pChangeset); |
| | @@ -172623,11 +172755,11 @@ |
| 172623 | 172755 | } |
| 172624 | 172756 | |
| 172625 | 172757 | /* |
| 172626 | 172758 | ** Streaming version of sqlite3changeset_start(). |
| 172627 | 172759 | */ |
| 172628 | | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_start_strm( |
| 172760 | +SQLITE_API int SQLITE_APICALL sqlite3changeset_start_strm( |
| 172629 | 172761 | sqlite3_changeset_iter **pp, /* OUT: Changeset iterator handle */ |
| 172630 | 172762 | int (*xInput)(void *pIn, void *pData, int *pnData), |
| 172631 | 172763 | void *pIn |
| 172632 | 172764 | ){ |
| 172633 | 172765 | return sessionChangesetStart(pp, xInput, pIn, 0, 0); |
| | @@ -173044,20 +173176,20 @@ |
| 173044 | 173176 | ** or SQLITE_CORRUPT. |
| 173045 | 173177 | ** |
| 173046 | 173178 | ** This function may not be called on iterators passed to a conflict handler |
| 173047 | 173179 | ** callback by changeset_apply(). |
| 173048 | 173180 | */ |
| 173049 | | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_next(sqlite3_changeset_iter *p){ |
| 173181 | +SQLITE_API int SQLITE_APICALL sqlite3changeset_next(sqlite3_changeset_iter *p){ |
| 173050 | 173182 | return sessionChangesetNext(p, 0, 0); |
| 173051 | 173183 | } |
| 173052 | 173184 | |
| 173053 | 173185 | /* |
| 173054 | 173186 | ** The following function extracts information on the current change |
| 173055 | 173187 | ** from a changeset iterator. It may only be called after changeset_next() |
| 173056 | 173188 | ** has returned SQLITE_ROW. |
| 173057 | 173189 | */ |
| 173058 | | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_op( |
| 173190 | +SQLITE_API int SQLITE_APICALL sqlite3changeset_op( |
| 173059 | 173191 | sqlite3_changeset_iter *pIter, /* Iterator handle */ |
| 173060 | 173192 | const char **pzTab, /* OUT: Pointer to table name */ |
| 173061 | 173193 | int *pnCol, /* OUT: Number of columns in table */ |
| 173062 | 173194 | int *pOp, /* OUT: SQLITE_INSERT, DELETE or UPDATE */ |
| 173063 | 173195 | int *pbIndirect /* OUT: True if change is indirect */ |
| | @@ -173073,11 +173205,11 @@ |
| 173073 | 173205 | ** Return information regarding the PRIMARY KEY and number of columns in |
| 173074 | 173206 | ** the database table affected by the change that pIter currently points |
| 173075 | 173207 | ** to. This function may only be called after changeset_next() returns |
| 173076 | 173208 | ** SQLITE_ROW. |
| 173077 | 173209 | */ |
| 173078 | | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_pk( |
| 173210 | +SQLITE_API int SQLITE_APICALL sqlite3changeset_pk( |
| 173079 | 173211 | sqlite3_changeset_iter *pIter, /* Iterator object */ |
| 173080 | 173212 | unsigned char **pabPK, /* OUT: Array of boolean - true for PK cols */ |
| 173081 | 173213 | int *pnCol /* OUT: Number of entries in output array */ |
| 173082 | 173214 | ){ |
| 173083 | 173215 | *pabPK = pIter->abPK; |
| | @@ -173096,11 +173228,11 @@ |
| 173096 | 173228 | ** was not modified and is not a PK column), set *ppValue to NULL. |
| 173097 | 173229 | ** |
| 173098 | 173230 | ** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is |
| 173099 | 173231 | ** not modified. Otherwise, SQLITE_OK. |
| 173100 | 173232 | */ |
| 173101 | | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_old( |
| 173233 | +SQLITE_API int SQLITE_APICALL sqlite3changeset_old( |
| 173102 | 173234 | sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
| 173103 | 173235 | int iVal, /* Index of old.* value to retrieve */ |
| 173104 | 173236 | sqlite3_value **ppValue /* OUT: Old value (or NULL pointer) */ |
| 173105 | 173237 | ){ |
| 173106 | 173238 | if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_DELETE ){ |
| | @@ -173124,11 +173256,11 @@ |
| 173124 | 173256 | ** was not modified), set *ppValue to NULL. |
| 173125 | 173257 | ** |
| 173126 | 173258 | ** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is |
| 173127 | 173259 | ** not modified. Otherwise, SQLITE_OK. |
| 173128 | 173260 | */ |
| 173129 | | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_new( |
| 173261 | +SQLITE_API int SQLITE_APICALL sqlite3changeset_new( |
| 173130 | 173262 | sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
| 173131 | 173263 | int iVal, /* Index of new.* value to retrieve */ |
| 173132 | 173264 | sqlite3_value **ppValue /* OUT: New value (or NULL pointer) */ |
| 173133 | 173265 | ){ |
| 173134 | 173266 | if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_INSERT ){ |
| | @@ -173158,11 +173290,11 @@ |
| 173158 | 173290 | ** containing the iVal'th value of the conflicting record. |
| 173159 | 173291 | ** |
| 173160 | 173292 | ** If value iVal is out-of-range or some other error occurs, an SQLite error |
| 173161 | 173293 | ** code is returned. Otherwise, SQLITE_OK. |
| 173162 | 173294 | */ |
| 173163 | | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_conflict( |
| 173295 | +SQLITE_API int SQLITE_APICALL sqlite3changeset_conflict( |
| 173164 | 173296 | sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
| 173165 | 173297 | int iVal, /* Index of conflict record value to fetch */ |
| 173166 | 173298 | sqlite3_value **ppValue /* OUT: Value from conflicting row */ |
| 173167 | 173299 | ){ |
| 173168 | 173300 | if( !pIter->pConflict ){ |
| | @@ -173181,11 +173313,11 @@ |
| 173181 | 173313 | ** it sets the output variable to the total number of known foreign key |
| 173182 | 173314 | ** violations in the destination database and returns SQLITE_OK. |
| 173183 | 173315 | ** |
| 173184 | 173316 | ** In all other cases this function returns SQLITE_MISUSE. |
| 173185 | 173317 | */ |
| 173186 | | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_fk_conflicts( |
| 173318 | +SQLITE_API int SQLITE_APICALL sqlite3changeset_fk_conflicts( |
| 173187 | 173319 | sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
| 173188 | 173320 | int *pnOut /* OUT: Number of FK violations */ |
| 173189 | 173321 | ){ |
| 173190 | 173322 | if( pIter->pConflict || pIter->apValue ){ |
| 173191 | 173323 | return SQLITE_MISUSE; |
| | @@ -173199,11 +173331,11 @@ |
| 173199 | 173331 | ** Finalize an iterator allocated with sqlite3changeset_start(). |
| 173200 | 173332 | ** |
| 173201 | 173333 | ** This function may not be called on iterators passed to a conflict handler |
| 173202 | 173334 | ** callback by changeset_apply(). |
| 173203 | 173335 | */ |
| 173204 | | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_finalize(sqlite3_changeset_iter *p){ |
| 173336 | +SQLITE_API int SQLITE_APICALL sqlite3changeset_finalize(sqlite3_changeset_iter *p){ |
| 173205 | 173337 | int rc = SQLITE_OK; |
| 173206 | 173338 | if( p ){ |
| 173207 | 173339 | int i; /* Used to iterate through p->apValue[] */ |
| 173208 | 173340 | rc = p->rc; |
| 173209 | 173341 | if( p->apValue ){ |
| | @@ -173373,11 +173505,11 @@ |
| 173373 | 173505 | |
| 173374 | 173506 | |
| 173375 | 173507 | /* |
| 173376 | 173508 | ** Invert a changeset object. |
| 173377 | 173509 | */ |
| 173378 | | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_invert( |
| 173510 | +SQLITE_API int SQLITE_APICALL sqlite3changeset_invert( |
| 173379 | 173511 | int nChangeset, /* Number of bytes in input */ |
| 173380 | 173512 | const void *pChangeset, /* Input changeset */ |
| 173381 | 173513 | int *pnInverted, /* OUT: Number of bytes in output changeset */ |
| 173382 | 173514 | void **ppInverted /* OUT: Inverse of pChangeset */ |
| 173383 | 173515 | ){ |
| | @@ -173392,11 +173524,11 @@ |
| 173392 | 173524 | } |
| 173393 | 173525 | |
| 173394 | 173526 | /* |
| 173395 | 173527 | ** Streaming version of sqlite3changeset_invert(). |
| 173396 | 173528 | */ |
| 173397 | | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_invert_strm( |
| 173529 | +SQLITE_API int SQLITE_APICALL sqlite3changeset_invert_strm( |
| 173398 | 173530 | int (*xInput)(void *pIn, void *pData, int *pnData), |
| 173399 | 173531 | void *pIn, |
| 173400 | 173532 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 173401 | 173533 | void *pOut |
| 173402 | 173534 | ){ |
| | @@ -174272,11 +174404,11 @@ |
| 174272 | 174404 | /* |
| 174273 | 174405 | ** Apply the changeset passed via pChangeset/nChangeset to the main database |
| 174274 | 174406 | ** attached to handle "db". Invoke the supplied conflict handler callback |
| 174275 | 174407 | ** to resolve any conflicts encountered while applying the change. |
| 174276 | 174408 | */ |
| 174277 | | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_apply( |
| 174409 | +SQLITE_API int SQLITE_APICALL sqlite3changeset_apply( |
| 174278 | 174410 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 174279 | 174411 | int nChangeset, /* Size of changeset in bytes */ |
| 174280 | 174412 | void *pChangeset, /* Changeset blob */ |
| 174281 | 174413 | int(*xFilter)( |
| 174282 | 174414 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| | @@ -174300,11 +174432,11 @@ |
| 174300 | 174432 | /* |
| 174301 | 174433 | ** Apply the changeset passed via xInput/pIn to the main database |
| 174302 | 174434 | ** attached to handle "db". Invoke the supplied conflict handler callback |
| 174303 | 174435 | ** to resolve any conflicts encountered while applying the change. |
| 174304 | 174436 | */ |
| 174305 | | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_apply_strm( |
| 174437 | +SQLITE_API int SQLITE_APICALL sqlite3changeset_apply_strm( |
| 174306 | 174438 | sqlite3 *db, /* Apply change to "main" db of this handle */ |
| 174307 | 174439 | int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */ |
| 174308 | 174440 | void *pIn, /* First arg for xInput */ |
| 174309 | 174441 | int(*xFilter)( |
| 174310 | 174442 | void *pCtx, /* Copy of sixth arg to _apply() */ |
| | @@ -174635,11 +174767,11 @@ |
| 174635 | 174767 | } |
| 174636 | 174768 | |
| 174637 | 174769 | /* |
| 174638 | 174770 | ** Allocate a new, empty, sqlite3_changegroup. |
| 174639 | 174771 | */ |
| 174640 | | -SQLITE_API int SQLITE_STDCALL sqlite3changegroup_new(sqlite3_changegroup **pp){ |
| 174772 | +SQLITE_API int SQLITE_APICALL sqlite3changegroup_new(sqlite3_changegroup **pp){ |
| 174641 | 174773 | int rc = SQLITE_OK; /* Return code */ |
| 174642 | 174774 | sqlite3_changegroup *p; /* New object */ |
| 174643 | 174775 | p = (sqlite3_changegroup*)sqlite3_malloc(sizeof(sqlite3_changegroup)); |
| 174644 | 174776 | if( p==0 ){ |
| 174645 | 174777 | rc = SQLITE_NOMEM; |
| | @@ -174652,11 +174784,11 @@ |
| 174652 | 174784 | |
| 174653 | 174785 | /* |
| 174654 | 174786 | ** Add the changeset currently stored in buffer pData, size nData bytes, |
| 174655 | 174787 | ** to changeset-group p. |
| 174656 | 174788 | */ |
| 174657 | | -SQLITE_API int SQLITE_STDCALL sqlite3changegroup_add(sqlite3_changegroup *pGrp, int nData, void *pData){ |
| 174789 | +SQLITE_API int SQLITE_APICALL sqlite3changegroup_add(sqlite3_changegroup *pGrp, int nData, void *pData){ |
| 174658 | 174790 | sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */ |
| 174659 | 174791 | int rc; /* Return code */ |
| 174660 | 174792 | |
| 174661 | 174793 | rc = sqlite3changeset_start(&pIter, nData, pData); |
| 174662 | 174794 | if( rc==SQLITE_OK ){ |
| | @@ -174668,11 +174800,11 @@ |
| 174668 | 174800 | |
| 174669 | 174801 | /* |
| 174670 | 174802 | ** Obtain a buffer containing a changeset representing the concatenation |
| 174671 | 174803 | ** of all changesets added to the group so far. |
| 174672 | 174804 | */ |
| 174673 | | -SQLITE_API int SQLITE_STDCALL sqlite3changegroup_output( |
| 174805 | +SQLITE_API int SQLITE_APICALL sqlite3changegroup_output( |
| 174674 | 174806 | sqlite3_changegroup *pGrp, |
| 174675 | 174807 | int *pnData, |
| 174676 | 174808 | void **ppData |
| 174677 | 174809 | ){ |
| 174678 | 174810 | return sessionChangegroupOutput(pGrp, 0, 0, pnData, ppData); |
| | @@ -174679,11 +174811,11 @@ |
| 174679 | 174811 | } |
| 174680 | 174812 | |
| 174681 | 174813 | /* |
| 174682 | 174814 | ** Streaming versions of changegroup_add(). |
| 174683 | 174815 | */ |
| 174684 | | -SQLITE_API int SQLITE_STDCALL sqlite3changegroup_add_strm( |
| 174816 | +SQLITE_API int SQLITE_APICALL sqlite3changegroup_add_strm( |
| 174685 | 174817 | sqlite3_changegroup *pGrp, |
| 174686 | 174818 | int (*xInput)(void *pIn, void *pData, int *pnData), |
| 174687 | 174819 | void *pIn |
| 174688 | 174820 | ){ |
| 174689 | 174821 | sqlite3_changeset_iter *pIter; /* Iterator opened on pData/nData */ |
| | @@ -174698,11 +174830,11 @@ |
| 174698 | 174830 | } |
| 174699 | 174831 | |
| 174700 | 174832 | /* |
| 174701 | 174833 | ** Streaming versions of changegroup_output(). |
| 174702 | 174834 | */ |
| 174703 | | -SQLITE_API int SQLITE_STDCALL sqlite3changegroup_output_strm( |
| 174835 | +SQLITE_API int SQLITE_APICALL sqlite3changegroup_output_strm( |
| 174704 | 174836 | sqlite3_changegroup *pGrp, |
| 174705 | 174837 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| 174706 | 174838 | void *pOut |
| 174707 | 174839 | ){ |
| 174708 | 174840 | return sessionChangegroupOutput(pGrp, xOutput, pOut, 0, 0); |
| | @@ -174709,21 +174841,21 @@ |
| 174709 | 174841 | } |
| 174710 | 174842 | |
| 174711 | 174843 | /* |
| 174712 | 174844 | ** Delete a changegroup object. |
| 174713 | 174845 | */ |
| 174714 | | -SQLITE_API void SQLITE_STDCALL sqlite3changegroup_delete(sqlite3_changegroup *pGrp){ |
| 174846 | +SQLITE_API void SQLITE_APICALL sqlite3changegroup_delete(sqlite3_changegroup *pGrp){ |
| 174715 | 174847 | if( pGrp ){ |
| 174716 | 174848 | sessionDeleteTable(pGrp->pList); |
| 174717 | 174849 | sqlite3_free(pGrp); |
| 174718 | 174850 | } |
| 174719 | 174851 | } |
| 174720 | 174852 | |
| 174721 | 174853 | /* |
| 174722 | 174854 | ** Combine two changesets together. |
| 174723 | 174855 | */ |
| 174724 | | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_concat( |
| 174856 | +SQLITE_API int SQLITE_APICALL sqlite3changeset_concat( |
| 174725 | 174857 | int nLeft, /* Number of bytes in lhs input */ |
| 174726 | 174858 | void *pLeft, /* Lhs input changeset */ |
| 174727 | 174859 | int nRight /* Number of bytes in rhs input */, |
| 174728 | 174860 | void *pRight, /* Rhs input changeset */ |
| 174729 | 174861 | int *pnOut, /* OUT: Number of bytes in output changeset */ |
| | @@ -174748,11 +174880,11 @@ |
| 174748 | 174880 | } |
| 174749 | 174881 | |
| 174750 | 174882 | /* |
| 174751 | 174883 | ** Streaming version of sqlite3changeset_concat(). |
| 174752 | 174884 | */ |
| 174753 | | -SQLITE_API int SQLITE_STDCALL sqlite3changeset_concat_strm( |
| 174885 | +SQLITE_API int SQLITE_APICALL sqlite3changeset_concat_strm( |
| 174754 | 174886 | int (*xInputA)(void *pIn, void *pData, int *pnData), |
| 174755 | 174887 | void *pInA, |
| 174756 | 174888 | int (*xInputB)(void *pIn, void *pData, int *pnData), |
| 174757 | 174889 | void *pInB, |
| 174758 | 174890 | int (*xOutput)(void *pOut, const void *pData, int nData), |
| | @@ -176003,10 +176135,11 @@ |
| 176003 | 176135 | sqlite3_context *ctx, |
| 176004 | 176136 | int argc, |
| 176005 | 176137 | sqlite3_value **argv |
| 176006 | 176138 | ){ |
| 176007 | 176139 | JsonString jx; |
| 176140 | + UNUSED_PARAM(argc); |
| 176008 | 176141 | |
| 176009 | 176142 | jsonInit(&jx, ctx); |
| 176010 | 176143 | jsonAppendValue(&jx, argv[0]); |
| 176011 | 176144 | jsonResult(&jx); |
| 176012 | 176145 | sqlite3_result_subtype(ctx, JSON_SUBTYPE); |
| | @@ -176979,11 +177112,11 @@ |
| 176979 | 177112 | |
| 176980 | 177113 | #ifndef SQLITE_CORE |
| 176981 | 177114 | #ifdef _WIN32 |
| 176982 | 177115 | __declspec(dllexport) |
| 176983 | 177116 | #endif |
| 176984 | | -SQLITE_API int SQLITE_STDCALL sqlite3_json_init( |
| 177117 | +SQLITE_API int SQLITE_APICALL sqlite3_json_init( |
| 176985 | 177118 | sqlite3 *db, |
| 176986 | 177119 | char **pzErrMsg, |
| 176987 | 177120 | const sqlite3_api_routines *pApi |
| 176988 | 177121 | ){ |
| 176989 | 177122 | SQLITE_EXTENSION_INIT2(pApi); |
| | @@ -193812,11 +193945,11 @@ |
| 193812 | 193945 | int nArg, /* Number of args */ |
| 193813 | 193946 | sqlite3_value **apUnused /* Function arguments */ |
| 193814 | 193947 | ){ |
| 193815 | 193948 | assert( nArg==0 ); |
| 193816 | 193949 | UNUSED_PARAM2(nArg, apUnused); |
| 193817 | | - sqlite3_result_text(pCtx, "fts5: 2016-07-25 11:39:24 5f40e6ad599eea59a5adc3a11d6f7998872736b4", -1, SQLITE_TRANSIENT); |
| 193950 | + sqlite3_result_text(pCtx, "fts5: 2016-08-01 21:17:53 d8ef9f58643f13dd3d16dcde0d829ae08324f04b", -1, SQLITE_TRANSIENT); |
| 193818 | 193951 | } |
| 193819 | 193952 | |
| 193820 | 193953 | static int fts5Init(sqlite3 *db){ |
| 193821 | 193954 | static const sqlite3_module fts5Mod = { |
| 193822 | 193955 | /* iVersion */ 2, |
| | @@ -193900,11 +194033,11 @@ |
| 193900 | 194033 | */ |
| 193901 | 194034 | #ifndef SQLITE_CORE |
| 193902 | 194035 | #ifdef _WIN32 |
| 193903 | 194036 | __declspec(dllexport) |
| 193904 | 194037 | #endif |
| 193905 | | -SQLITE_API int SQLITE_STDCALL sqlite3_fts_init( |
| 194038 | +SQLITE_API int SQLITE_APICALL sqlite3_fts_init( |
| 193906 | 194039 | sqlite3 *db, |
| 193907 | 194040 | char **pzErrMsg, |
| 193908 | 194041 | const sqlite3_api_routines *pApi |
| 193909 | 194042 | ){ |
| 193910 | 194043 | SQLITE_EXTENSION_INIT2(pApi); |
| | @@ -193913,11 +194046,11 @@ |
| 193913 | 194046 | } |
| 193914 | 194047 | |
| 193915 | 194048 | #ifdef _WIN32 |
| 193916 | 194049 | __declspec(dllexport) |
| 193917 | 194050 | #endif |
| 193918 | | -SQLITE_API int SQLITE_STDCALL sqlite3_fts5_init( |
| 194051 | +SQLITE_API int SQLITE_APICALL sqlite3_fts5_init( |
| 193919 | 194052 | sqlite3 *db, |
| 193920 | 194053 | char **pzErrMsg, |
| 193921 | 194054 | const sqlite3_api_routines *pApi |
| 193922 | 194055 | ){ |
| 193923 | 194056 | SQLITE_EXTENSION_INIT2(pApi); |
| 193924 | 194057 | |