| | @@ -20,13 +20,10 @@ |
| 20 | 20 | #define SQLITE_CORE 1 |
| 21 | 21 | #define SQLITE_AMALGAMATION 1 |
| 22 | 22 | #ifndef SQLITE_PRIVATE |
| 23 | 23 | # define SQLITE_PRIVATE static |
| 24 | 24 | #endif |
| 25 | | -#ifndef SQLITE_API |
| 26 | | -# define SQLITE_API |
| 27 | | -#endif |
| 28 | 25 | /************** Begin file sqliteInt.h ***************************************/ |
| 29 | 26 | /* |
| 30 | 27 | ** 2001 September 15 |
| 31 | 28 | ** |
| 32 | 29 | ** The author disclaims copyright to this source code. In place of |
| | @@ -250,27 +247,24 @@ |
| 250 | 247 | extern "C" { |
| 251 | 248 | #endif |
| 252 | 249 | |
| 253 | 250 | |
| 254 | 251 | /* |
| 255 | | -** Add the ability to override 'extern' |
| 252 | +** Provide the ability to override linkage features of the interface. |
| 256 | 253 | */ |
| 257 | 254 | #ifndef SQLITE_EXTERN |
| 258 | 255 | # define SQLITE_EXTERN extern |
| 259 | 256 | #endif |
| 260 | | - |
| 261 | 257 | #ifndef SQLITE_API |
| 262 | 258 | # define SQLITE_API |
| 263 | 259 | #endif |
| 264 | | - |
| 265 | | - |
| 266 | | -/* |
| 267 | | -** Add the ability to override 'cdecl' |
| 268 | | -*/ |
| 269 | 260 | #ifndef SQLITE_CDECL |
| 270 | 261 | # define SQLITE_CDECL |
| 271 | 262 | #endif |
| 263 | +#ifndef SQLITE_STDCALL |
| 264 | +# define SQLITE_STDCALL |
| 265 | +#endif |
| 272 | 266 | |
| 273 | 267 | /* |
| 274 | 268 | ** These no-op macros are used in front of interfaces to mark those |
| 275 | 269 | ** interfaces as either deprecated or experimental. New applications |
| 276 | 270 | ** should not use deprecated interfaces - they are supported for backwards |
| | @@ -323,11 +317,11 @@ |
| 323 | 317 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 324 | 318 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 325 | 319 | */ |
| 326 | 320 | #define SQLITE_VERSION "3.8.9" |
| 327 | 321 | #define SQLITE_VERSION_NUMBER 3008009 |
| 328 | | -#define SQLITE_SOURCE_ID "2015-03-24 18:19:39 436314b5728c9413f9ac2d837e1c19364f31be72" |
| 322 | +#define SQLITE_SOURCE_ID "2015-03-30 23:43:56 395bb3e677a6551b06ba96fc58c393132b93d1e8" |
| 329 | 323 | |
| 330 | 324 | /* |
| 331 | 325 | ** CAPI3REF: Run-Time Library Version Numbers |
| 332 | 326 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 333 | 327 | ** |
| | @@ -356,13 +350,13 @@ |
| 356 | 350 | ** [SQLITE_SOURCE_ID] C preprocessor macro. |
| 357 | 351 | ** |
| 358 | 352 | ** See also: [sqlite_version()] and [sqlite_source_id()]. |
| 359 | 353 | */ |
| 360 | 354 | SQLITE_API const char sqlite3_version[] = SQLITE_VERSION; |
| 361 | | -SQLITE_API const char *sqlite3_libversion(void); |
| 362 | | -SQLITE_API const char *sqlite3_sourceid(void); |
| 363 | | -SQLITE_API int sqlite3_libversion_number(void); |
| 355 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void); |
| 356 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void); |
| 357 | +SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void); |
| 364 | 358 | |
| 365 | 359 | /* |
| 366 | 360 | ** CAPI3REF: Run-Time Library Compilation Options Diagnostics |
| 367 | 361 | ** |
| 368 | 362 | ** ^The sqlite3_compileoption_used() function returns 0 or 1 |
| | @@ -383,12 +377,12 @@ |
| 383 | 377 | ** |
| 384 | 378 | ** See also: SQL functions [sqlite_compileoption_used()] and |
| 385 | 379 | ** [sqlite_compileoption_get()] and the [compile_options pragma]. |
| 386 | 380 | */ |
| 387 | 381 | #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS |
| 388 | | -SQLITE_API int sqlite3_compileoption_used(const char *zOptName); |
| 389 | | -SQLITE_API const char *sqlite3_compileoption_get(int N); |
| 382 | +SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName); |
| 383 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N); |
| 390 | 384 | #endif |
| 391 | 385 | |
| 392 | 386 | /* |
| 393 | 387 | ** CAPI3REF: Test To See If The Library Is Threadsafe |
| 394 | 388 | ** |
| | @@ -423,11 +417,11 @@ |
| 423 | 417 | ** sqlite3_config(). In other words, the return value from sqlite3_threadsafe() |
| 424 | 418 | ** is unchanged by calls to sqlite3_config().)^ |
| 425 | 419 | ** |
| 426 | 420 | ** See the [threading mode] documentation for additional information. |
| 427 | 421 | */ |
| 428 | | -SQLITE_API int sqlite3_threadsafe(void); |
| 422 | +SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void); |
| 429 | 423 | |
| 430 | 424 | /* |
| 431 | 425 | ** CAPI3REF: Database Connection Handle |
| 432 | 426 | ** KEYWORDS: {database connection} {database connections} |
| 433 | 427 | ** |
| | @@ -519,12 +513,12 @@ |
| 519 | 513 | ** from [sqlite3_open()], [sqlite3_open16()], or |
| 520 | 514 | ** [sqlite3_open_v2()], and not previously closed. |
| 521 | 515 | ** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer |
| 522 | 516 | ** argument is a harmless no-op. |
| 523 | 517 | */ |
| 524 | | -SQLITE_API int sqlite3_close(sqlite3*); |
| 525 | | -SQLITE_API int sqlite3_close_v2(sqlite3*); |
| 518 | +SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3*); |
| 519 | +SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3*); |
| 526 | 520 | |
| 527 | 521 | /* |
| 528 | 522 | ** The type for a callback function. |
| 529 | 523 | ** This is legacy and deprecated. It is included for historical |
| 530 | 524 | ** compatibility and is not documented. |
| | @@ -590,11 +584,11 @@ |
| 590 | 584 | ** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running. |
| 591 | 585 | ** <li> The application must not modify the SQL statement text passed into |
| 592 | 586 | ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running. |
| 593 | 587 | ** </ul> |
| 594 | 588 | */ |
| 595 | | -SQLITE_API int sqlite3_exec( |
| 589 | +SQLITE_API int SQLITE_STDCALL sqlite3_exec( |
| 596 | 590 | sqlite3*, /* An open database */ |
| 597 | 591 | const char *sql, /* SQL to be evaluated */ |
| 598 | 592 | int (*callback)(void*,int,char**,char**), /* Callback function */ |
| 599 | 593 | void *, /* 1st argument to callback */ |
| 600 | 594 | char **errmsg /* Error msg written here */ |
| | @@ -1550,14 +1544,14 @@ |
| 1550 | 1544 | ** sqlite3_os_init() and sqlite3_os_end(). An application-supplied |
| 1551 | 1545 | ** implementation of sqlite3_os_init() or sqlite3_os_end() |
| 1552 | 1546 | ** must return [SQLITE_OK] on success and some other [error code] upon |
| 1553 | 1547 | ** failure. |
| 1554 | 1548 | */ |
| 1555 | | -SQLITE_API int sqlite3_initialize(void); |
| 1556 | | -SQLITE_API int sqlite3_shutdown(void); |
| 1557 | | -SQLITE_API int sqlite3_os_init(void); |
| 1558 | | -SQLITE_API int sqlite3_os_end(void); |
| 1549 | +SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void); |
| 1550 | +SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void); |
| 1551 | +SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void); |
| 1552 | +SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void); |
| 1559 | 1553 | |
| 1560 | 1554 | /* |
| 1561 | 1555 | ** CAPI3REF: Configuring The SQLite Library |
| 1562 | 1556 | ** |
| 1563 | 1557 | ** The sqlite3_config() interface is used to make global configuration |
| | @@ -1584,11 +1578,11 @@ |
| 1584 | 1578 | ** |
| 1585 | 1579 | ** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK]. |
| 1586 | 1580 | ** ^If the option is unknown or SQLite is unable to set the option |
| 1587 | 1581 | ** then this routine returns a non-zero [error code]. |
| 1588 | 1582 | */ |
| 1589 | | -SQLITE_API int sqlite3_config(int, ...); |
| 1583 | +SQLITE_API int SQLITE_CDECL sqlite3_config(int, ...); |
| 1590 | 1584 | |
| 1591 | 1585 | /* |
| 1592 | 1586 | ** CAPI3REF: Configure database connections |
| 1593 | 1587 | ** |
| 1594 | 1588 | ** The sqlite3_db_config() interface is used to make configuration |
| | @@ -1602,11 +1596,11 @@ |
| 1602 | 1596 | ** Subsequent arguments vary depending on the configuration verb. |
| 1603 | 1597 | ** |
| 1604 | 1598 | ** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if |
| 1605 | 1599 | ** the call is considered successful. |
| 1606 | 1600 | */ |
| 1607 | | -SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...); |
| 1601 | +SQLITE_API int SQLITE_CDECL sqlite3_db_config(sqlite3*, int op, ...); |
| 1608 | 1602 | |
| 1609 | 1603 | /* |
| 1610 | 1604 | ** CAPI3REF: Memory Allocation Routines |
| 1611 | 1605 | ** |
| 1612 | 1606 | ** An instance of this object defines the interface between SQLite |
| | @@ -2090,11 +2084,11 @@ |
| 2090 | 2084 | ** |
| 2091 | 2085 | ** ^The sqlite3_extended_result_codes() routine enables or disables the |
| 2092 | 2086 | ** [extended result codes] feature of SQLite. ^The extended result |
| 2093 | 2087 | ** codes are disabled by default for historical compatibility. |
| 2094 | 2088 | */ |
| 2095 | | -SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff); |
| 2089 | +SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff); |
| 2096 | 2090 | |
| 2097 | 2091 | /* |
| 2098 | 2092 | ** CAPI3REF: Last Insert Rowid |
| 2099 | 2093 | ** |
| 2100 | 2094 | ** ^Each entry in most SQLite tables (except for [WITHOUT ROWID] tables) |
| | @@ -2141,11 +2135,11 @@ |
| 2141 | 2135 | ** function is running and thus changes the last insert [rowid], |
| 2142 | 2136 | ** then the value returned by [sqlite3_last_insert_rowid()] is |
| 2143 | 2137 | ** unpredictable and might not equal either the old or the new |
| 2144 | 2138 | ** last insert [rowid]. |
| 2145 | 2139 | */ |
| 2146 | | -SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*); |
| 2140 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*); |
| 2147 | 2141 | |
| 2148 | 2142 | /* |
| 2149 | 2143 | ** CAPI3REF: Count The Number Of Rows Modified |
| 2150 | 2144 | ** |
| 2151 | 2145 | ** ^This function returns the number of rows modified, inserted or |
| | @@ -2193,11 +2187,11 @@ |
| 2193 | 2187 | ** |
| 2194 | 2188 | ** If a separate thread makes changes on the same database connection |
| 2195 | 2189 | ** while [sqlite3_changes()] is running then the value returned |
| 2196 | 2190 | ** is unpredictable and not meaningful. |
| 2197 | 2191 | */ |
| 2198 | | -SQLITE_API int sqlite3_changes(sqlite3*); |
| 2192 | +SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3*); |
| 2199 | 2193 | |
| 2200 | 2194 | /* |
| 2201 | 2195 | ** CAPI3REF: Total Number Of Rows Modified |
| 2202 | 2196 | ** |
| 2203 | 2197 | ** ^This function returns the total number of rows inserted, modified or |
| | @@ -2216,11 +2210,11 @@ |
| 2216 | 2210 | ** |
| 2217 | 2211 | ** If a separate thread makes changes on the same database connection |
| 2218 | 2212 | ** while [sqlite3_total_changes()] is running then the value |
| 2219 | 2213 | ** returned is unpredictable and not meaningful. |
| 2220 | 2214 | */ |
| 2221 | | -SQLITE_API int sqlite3_total_changes(sqlite3*); |
| 2215 | +SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3*); |
| 2222 | 2216 | |
| 2223 | 2217 | /* |
| 2224 | 2218 | ** CAPI3REF: Interrupt A Long-Running Query |
| 2225 | 2219 | ** |
| 2226 | 2220 | ** ^This function causes any pending database operation to abort and |
| | @@ -2255,11 +2249,11 @@ |
| 2255 | 2249 | ** that are started after the sqlite3_interrupt() call returns. |
| 2256 | 2250 | ** |
| 2257 | 2251 | ** If the database connection closes while [sqlite3_interrupt()] |
| 2258 | 2252 | ** is running then bad things will likely happen. |
| 2259 | 2253 | */ |
| 2260 | | -SQLITE_API void sqlite3_interrupt(sqlite3*); |
| 2254 | +SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3*); |
| 2261 | 2255 | |
| 2262 | 2256 | /* |
| 2263 | 2257 | ** CAPI3REF: Determine If An SQL Statement Is Complete |
| 2264 | 2258 | ** |
| 2265 | 2259 | ** These routines are useful during command-line input to determine if the |
| | @@ -2290,12 +2284,12 @@ |
| 2290 | 2284 | ** UTF-8 string. |
| 2291 | 2285 | ** |
| 2292 | 2286 | ** The input to [sqlite3_complete16()] must be a zero-terminated |
| 2293 | 2287 | ** UTF-16 string in native byte order. |
| 2294 | 2288 | */ |
| 2295 | | -SQLITE_API int sqlite3_complete(const char *sql); |
| 2296 | | -SQLITE_API int sqlite3_complete16(const void *sql); |
| 2289 | +SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *sql); |
| 2290 | +SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *sql); |
| 2297 | 2291 | |
| 2298 | 2292 | /* |
| 2299 | 2293 | ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors |
| 2300 | 2294 | ** KEYWORDS: {busy-handler callback} {busy handler} |
| 2301 | 2295 | ** |
| | @@ -2351,11 +2345,11 @@ |
| 2351 | 2345 | ** result in undefined behavior. |
| 2352 | 2346 | ** |
| 2353 | 2347 | ** A busy handler must not close the database connection |
| 2354 | 2348 | ** or [prepared statement] that invoked the busy handler. |
| 2355 | 2349 | */ |
| 2356 | | -SQLITE_API int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*); |
| 2350 | +SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*); |
| 2357 | 2351 | |
| 2358 | 2352 | /* |
| 2359 | 2353 | ** CAPI3REF: Set A Busy Timeout |
| 2360 | 2354 | ** |
| 2361 | 2355 | ** ^This routine sets a [sqlite3_busy_handler | busy handler] that sleeps |
| | @@ -2373,11 +2367,11 @@ |
| 2373 | 2367 | ** was defined (using [sqlite3_busy_handler()]) prior to calling |
| 2374 | 2368 | ** this routine, that other busy handler is cleared.)^ |
| 2375 | 2369 | ** |
| 2376 | 2370 | ** See also: [PRAGMA busy_timeout] |
| 2377 | 2371 | */ |
| 2378 | | -SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms); |
| 2372 | +SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3*, int ms); |
| 2379 | 2373 | |
| 2380 | 2374 | /* |
| 2381 | 2375 | ** CAPI3REF: Convenience Routines For Running Queries |
| 2382 | 2376 | ** |
| 2383 | 2377 | ** This is a legacy interface that is preserved for backwards compatibility. |
| | @@ -2447,19 +2441,19 @@ |
| 2447 | 2441 | ** interface defined here. As a consequence, errors that occur in the |
| 2448 | 2442 | ** wrapper layer outside of the internal [sqlite3_exec()] call are not |
| 2449 | 2443 | ** reflected in subsequent calls to [sqlite3_errcode()] or |
| 2450 | 2444 | ** [sqlite3_errmsg()]. |
| 2451 | 2445 | */ |
| 2452 | | -SQLITE_API int sqlite3_get_table( |
| 2446 | +SQLITE_API int SQLITE_STDCALL sqlite3_get_table( |
| 2453 | 2447 | sqlite3 *db, /* An open database */ |
| 2454 | 2448 | const char *zSql, /* SQL to be evaluated */ |
| 2455 | 2449 | char ***pazResult, /* Results of the query */ |
| 2456 | 2450 | int *pnRow, /* Number of result rows written here */ |
| 2457 | 2451 | int *pnColumn, /* Number of result columns written here */ |
| 2458 | 2452 | char **pzErrmsg /* Error msg written here */ |
| 2459 | 2453 | ); |
| 2460 | | -SQLITE_API void sqlite3_free_table(char **result); |
| 2454 | +SQLITE_API void SQLITE_STDCALL sqlite3_free_table(char **result); |
| 2461 | 2455 | |
| 2462 | 2456 | /* |
| 2463 | 2457 | ** CAPI3REF: Formatted String Printing Functions |
| 2464 | 2458 | ** |
| 2465 | 2459 | ** These routines are work-alikes of the "printf()" family of functions |
| | @@ -2561,14 +2555,14 @@ |
| 2561 | 2555 | ** |
| 2562 | 2556 | ** ^(The "%z" formatting option works like "%s" but with the |
| 2563 | 2557 | ** addition that after the string has been read and copied into |
| 2564 | 2558 | ** the result, [sqlite3_free()] is called on the input string.)^ |
| 2565 | 2559 | */ |
| 2566 | | -SQLITE_API char *sqlite3_mprintf(const char*,...); |
| 2567 | | -SQLITE_API char *sqlite3_vmprintf(const char*, va_list); |
| 2568 | | -SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...); |
| 2569 | | -SQLITE_API char *sqlite3_vsnprintf(int,char*,const char*, va_list); |
| 2560 | +SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char*,...); |
| 2561 | +SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char*, va_list); |
| 2562 | +SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int,char*,const char*, ...); |
| 2563 | +SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int,char*,const char*, va_list); |
| 2570 | 2564 | |
| 2571 | 2565 | /* |
| 2572 | 2566 | ** CAPI3REF: Memory Allocation Subsystem |
| 2573 | 2567 | ** |
| 2574 | 2568 | ** The SQLite core uses these three routines for all of its own |
| | @@ -2654,16 +2648,16 @@ |
| 2654 | 2648 | ** |
| 2655 | 2649 | ** The application must not read or write any part of |
| 2656 | 2650 | ** a block of memory after it has been released using |
| 2657 | 2651 | ** [sqlite3_free()] or [sqlite3_realloc()]. |
| 2658 | 2652 | */ |
| 2659 | | -SQLITE_API void *sqlite3_malloc(int); |
| 2660 | | -SQLITE_API void *sqlite3_malloc64(sqlite3_uint64); |
| 2661 | | -SQLITE_API void *sqlite3_realloc(void*, int); |
| 2662 | | -SQLITE_API void *sqlite3_realloc64(void*, sqlite3_uint64); |
| 2663 | | -SQLITE_API void sqlite3_free(void*); |
| 2664 | | -SQLITE_API sqlite3_uint64 sqlite3_msize(void*); |
| 2653 | +SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int); |
| 2654 | +SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64); |
| 2655 | +SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void*, int); |
| 2656 | +SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void*, sqlite3_uint64); |
| 2657 | +SQLITE_API void SQLITE_STDCALL sqlite3_free(void*); |
| 2658 | +SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void*); |
| 2665 | 2659 | |
| 2666 | 2660 | /* |
| 2667 | 2661 | ** CAPI3REF: Memory Allocator Statistics |
| 2668 | 2662 | ** |
| 2669 | 2663 | ** SQLite provides these two interfaces for reporting on the status |
| | @@ -2684,12 +2678,12 @@ |
| 2684 | 2678 | ** [sqlite3_memory_used()] if and only if the parameter to |
| 2685 | 2679 | ** [sqlite3_memory_highwater()] is true. ^The value returned |
| 2686 | 2680 | ** by [sqlite3_memory_highwater(1)] is the high-water mark |
| 2687 | 2681 | ** prior to the reset. |
| 2688 | 2682 | */ |
| 2689 | | -SQLITE_API sqlite3_int64 sqlite3_memory_used(void); |
| 2690 | | -SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag); |
| 2683 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void); |
| 2684 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag); |
| 2691 | 2685 | |
| 2692 | 2686 | /* |
| 2693 | 2687 | ** CAPI3REF: Pseudo-Random Number Generator |
| 2694 | 2688 | ** |
| 2695 | 2689 | ** SQLite contains a high-quality pseudo-random number generator (PRNG) used to |
| | @@ -2708,11 +2702,11 @@ |
| 2708 | 2702 | ** ^If the previous call to this routine had an N of 1 or more and a |
| 2709 | 2703 | ** non-NULL P then the pseudo-randomness is generated |
| 2710 | 2704 | ** internally and without recourse to the [sqlite3_vfs] xRandomness |
| 2711 | 2705 | ** method. |
| 2712 | 2706 | */ |
| 2713 | | -SQLITE_API void sqlite3_randomness(int N, void *P); |
| 2707 | +SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P); |
| 2714 | 2708 | |
| 2715 | 2709 | /* |
| 2716 | 2710 | ** CAPI3REF: Compile-Time Authorization Callbacks |
| 2717 | 2711 | ** |
| 2718 | 2712 | ** ^This routine registers an authorizer callback with a particular |
| | @@ -2790,11 +2784,11 @@ |
| 2790 | 2784 | ** [sqlite3_prepare()] or its variants. Authorization is not |
| 2791 | 2785 | ** performed during statement evaluation in [sqlite3_step()], unless |
| 2792 | 2786 | ** as stated in the previous paragraph, sqlite3_step() invokes |
| 2793 | 2787 | ** sqlite3_prepare_v2() to reprepare a statement after a schema change. |
| 2794 | 2788 | */ |
| 2795 | | -SQLITE_API int sqlite3_set_authorizer( |
| 2789 | +SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer( |
| 2796 | 2790 | sqlite3*, |
| 2797 | 2791 | int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), |
| 2798 | 2792 | void *pUserData |
| 2799 | 2793 | ); |
| 2800 | 2794 | |
| | @@ -2894,12 +2888,12 @@ |
| 2894 | 2888 | ** digits in the time are meaningless. Future versions of SQLite |
| 2895 | 2889 | ** might provide greater resolution on the profiler callback. The |
| 2896 | 2890 | ** sqlite3_profile() function is considered experimental and is |
| 2897 | 2891 | ** subject to change in future versions of SQLite. |
| 2898 | 2892 | */ |
| 2899 | | -SQLITE_API void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*); |
| 2900 | | -SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_profile(sqlite3*, |
| 2893 | +SQLITE_API void *SQLITE_STDCALL sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*); |
| 2894 | +SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_profile(sqlite3*, |
| 2901 | 2895 | void(*xProfile)(void*,const char*,sqlite3_uint64), void*); |
| 2902 | 2896 | |
| 2903 | 2897 | /* |
| 2904 | 2898 | ** CAPI3REF: Query Progress Callbacks |
| 2905 | 2899 | ** |
| | @@ -2929,11 +2923,11 @@ |
| 2929 | 2923 | ** the database connection that invoked the progress handler. |
| 2930 | 2924 | ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their |
| 2931 | 2925 | ** database connections for the meaning of "modify" in this paragraph. |
| 2932 | 2926 | ** |
| 2933 | 2927 | */ |
| 2934 | | -SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); |
| 2928 | +SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); |
| 2935 | 2929 | |
| 2936 | 2930 | /* |
| 2937 | 2931 | ** CAPI3REF: Opening A New Database Connection |
| 2938 | 2932 | ** |
| 2939 | 2933 | ** ^These routines open an SQLite database file as specified by the |
| | @@ -3157,19 +3151,19 @@ |
| 3157 | 3151 | ** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various |
| 3158 | 3152 | ** features that require the use of temporary files may fail. |
| 3159 | 3153 | ** |
| 3160 | 3154 | ** See also: [sqlite3_temp_directory] |
| 3161 | 3155 | */ |
| 3162 | | -SQLITE_API int sqlite3_open( |
| 3156 | +SQLITE_API int SQLITE_STDCALL sqlite3_open( |
| 3163 | 3157 | const char *filename, /* Database filename (UTF-8) */ |
| 3164 | 3158 | sqlite3 **ppDb /* OUT: SQLite db handle */ |
| 3165 | 3159 | ); |
| 3166 | | -SQLITE_API int sqlite3_open16( |
| 3160 | +SQLITE_API int SQLITE_STDCALL sqlite3_open16( |
| 3167 | 3161 | const void *filename, /* Database filename (UTF-16) */ |
| 3168 | 3162 | sqlite3 **ppDb /* OUT: SQLite db handle */ |
| 3169 | 3163 | ); |
| 3170 | | -SQLITE_API int sqlite3_open_v2( |
| 3164 | +SQLITE_API int SQLITE_STDCALL sqlite3_open_v2( |
| 3171 | 3165 | const char *filename, /* Database filename (UTF-8) */ |
| 3172 | 3166 | sqlite3 **ppDb, /* OUT: SQLite db handle */ |
| 3173 | 3167 | int flags, /* Flags */ |
| 3174 | 3168 | const char *zVfs /* Name of VFS module to use */ |
| 3175 | 3169 | ); |
| | @@ -3211,13 +3205,13 @@ |
| 3211 | 3205 | ** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and |
| 3212 | 3206 | ** is not a database file pathname pointer that SQLite passed into the xOpen |
| 3213 | 3207 | ** VFS method, then the behavior of this routine is undefined and probably |
| 3214 | 3208 | ** undesirable. |
| 3215 | 3209 | */ |
| 3216 | | -SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam); |
| 3217 | | -SQLITE_API int sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault); |
| 3218 | | -SQLITE_API sqlite3_int64 sqlite3_uri_int64(const char*, const char*, sqlite3_int64); |
| 3210 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam); |
| 3211 | +SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault); |
| 3212 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64(const char*, const char*, sqlite3_int64); |
| 3219 | 3213 | |
| 3220 | 3214 | |
| 3221 | 3215 | /* |
| 3222 | 3216 | ** CAPI3REF: Error Codes And Messages |
| 3223 | 3217 | ** |
| | @@ -3256,15 +3250,15 @@ |
| 3256 | 3250 | ** |
| 3257 | 3251 | ** If an interface fails with SQLITE_MISUSE, that means the interface |
| 3258 | 3252 | ** was invoked incorrectly by the application. In that case, the |
| 3259 | 3253 | ** error code and message may or may not be set. |
| 3260 | 3254 | */ |
| 3261 | | -SQLITE_API int sqlite3_errcode(sqlite3 *db); |
| 3262 | | -SQLITE_API int sqlite3_extended_errcode(sqlite3 *db); |
| 3263 | | -SQLITE_API const char *sqlite3_errmsg(sqlite3*); |
| 3264 | | -SQLITE_API const void *sqlite3_errmsg16(sqlite3*); |
| 3265 | | -SQLITE_API const char *sqlite3_errstr(int); |
| 3255 | +SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db); |
| 3256 | +SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db); |
| 3257 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3*); |
| 3258 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3*); |
| 3259 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int); |
| 3266 | 3260 | |
| 3267 | 3261 | /* |
| 3268 | 3262 | ** CAPI3REF: SQL Statement Object |
| 3269 | 3263 | ** KEYWORDS: {prepared statement} {prepared statements} |
| 3270 | 3264 | ** |
| | @@ -3327,11 +3321,11 @@ |
| 3327 | 3321 | ** created by an untrusted script can be contained using the |
| 3328 | 3322 | ** [max_page_count] [PRAGMA]. |
| 3329 | 3323 | ** |
| 3330 | 3324 | ** New run-time limit categories may be added in future releases. |
| 3331 | 3325 | */ |
| 3332 | | -SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal); |
| 3326 | +SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal); |
| 3333 | 3327 | |
| 3334 | 3328 | /* |
| 3335 | 3329 | ** CAPI3REF: Run-Time Limit Categories |
| 3336 | 3330 | ** KEYWORDS: {limit category} {*limit categories} |
| 3337 | 3331 | ** |
| | @@ -3477,32 +3471,32 @@ |
| 3477 | 3471 | ** or [GLOB] operator or if the parameter is compared to an indexed column |
| 3478 | 3472 | ** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled. |
| 3479 | 3473 | ** </li> |
| 3480 | 3474 | ** </ol> |
| 3481 | 3475 | */ |
| 3482 | | -SQLITE_API int sqlite3_prepare( |
| 3476 | +SQLITE_API int SQLITE_STDCALL sqlite3_prepare( |
| 3483 | 3477 | sqlite3 *db, /* Database handle */ |
| 3484 | 3478 | const char *zSql, /* SQL statement, UTF-8 encoded */ |
| 3485 | 3479 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3486 | 3480 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3487 | 3481 | const char **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3488 | 3482 | ); |
| 3489 | | -SQLITE_API int sqlite3_prepare_v2( |
| 3483 | +SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2( |
| 3490 | 3484 | sqlite3 *db, /* Database handle */ |
| 3491 | 3485 | const char *zSql, /* SQL statement, UTF-8 encoded */ |
| 3492 | 3486 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3493 | 3487 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3494 | 3488 | const char **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3495 | 3489 | ); |
| 3496 | | -SQLITE_API int sqlite3_prepare16( |
| 3490 | +SQLITE_API int SQLITE_STDCALL sqlite3_prepare16( |
| 3497 | 3491 | sqlite3 *db, /* Database handle */ |
| 3498 | 3492 | const void *zSql, /* SQL statement, UTF-16 encoded */ |
| 3499 | 3493 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3500 | 3494 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3501 | 3495 | const void **pzTail /* OUT: Pointer to unused portion of zSql */ |
| 3502 | 3496 | ); |
| 3503 | | -SQLITE_API int sqlite3_prepare16_v2( |
| 3497 | +SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2( |
| 3504 | 3498 | sqlite3 *db, /* Database handle */ |
| 3505 | 3499 | const void *zSql, /* SQL statement, UTF-16 encoded */ |
| 3506 | 3500 | int nByte, /* Maximum length of zSql in bytes. */ |
| 3507 | 3501 | sqlite3_stmt **ppStmt, /* OUT: Statement handle */ |
| 3508 | 3502 | const void **pzTail /* OUT: Pointer to unused portion of zSql */ |
| | @@ -3513,11 +3507,11 @@ |
| 3513 | 3507 | ** |
| 3514 | 3508 | ** ^This interface can be used to retrieve a saved copy of the original |
| 3515 | 3509 | ** SQL text used to create a [prepared statement] if that statement was |
| 3516 | 3510 | ** compiled using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()]. |
| 3517 | 3511 | */ |
| 3518 | | -SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt); |
| 3512 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt); |
| 3519 | 3513 | |
| 3520 | 3514 | /* |
| 3521 | 3515 | ** CAPI3REF: Determine If An SQL Statement Writes The Database |
| 3522 | 3516 | ** |
| 3523 | 3517 | ** ^The sqlite3_stmt_readonly(X) interface returns true (non-zero) if |
| | @@ -3544,11 +3538,11 @@ |
| 3544 | 3538 | ** database. ^The [ATTACH] and [DETACH] statements also cause |
| 3545 | 3539 | ** sqlite3_stmt_readonly() to return true since, while those statements |
| 3546 | 3540 | ** change the configuration of a database connection, they do not make |
| 3547 | 3541 | ** changes to the content of the database files on disk. |
| 3548 | 3542 | */ |
| 3549 | | -SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt); |
| 3543 | +SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt); |
| 3550 | 3544 | |
| 3551 | 3545 | /* |
| 3552 | 3546 | ** CAPI3REF: Determine If A Prepared Statement Has Been Reset |
| 3553 | 3547 | ** |
| 3554 | 3548 | ** ^The sqlite3_stmt_busy(S) interface returns true (non-zero) if the |
| | @@ -3563,11 +3557,11 @@ |
| 3563 | 3557 | ** to locate all prepared statements associated with a database |
| 3564 | 3558 | ** connection that are in need of being reset. This can be used, |
| 3565 | 3559 | ** for example, in diagnostic routines to search for prepared |
| 3566 | 3560 | ** statements that are holding a transaction open. |
| 3567 | 3561 | */ |
| 3568 | | -SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*); |
| 3562 | +SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt*); |
| 3569 | 3563 | |
| 3570 | 3564 | /* |
| 3571 | 3565 | ** CAPI3REF: Dynamically Typed Value Object |
| 3572 | 3566 | ** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value} |
| 3573 | 3567 | ** |
| | @@ -3724,23 +3718,23 @@ |
| 3724 | 3718 | ** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails. |
| 3725 | 3719 | ** |
| 3726 | 3720 | ** See also: [sqlite3_bind_parameter_count()], |
| 3727 | 3721 | ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()]. |
| 3728 | 3722 | */ |
| 3729 | | -SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*)); |
| 3730 | | -SQLITE_API int sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64, |
| 3723 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*)); |
| 3724 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64, |
| 3731 | 3725 | void(*)(void*)); |
| 3732 | | -SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double); |
| 3733 | | -SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int); |
| 3734 | | -SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64); |
| 3735 | | -SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int); |
| 3736 | | -SQLITE_API int sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*)); |
| 3737 | | -SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*)); |
| 3738 | | -SQLITE_API int sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64, |
| 3726 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt*, int, double); |
| 3727 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt*, int, int); |
| 3728 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64); |
| 3729 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt*, int); |
| 3730 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*)); |
| 3731 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*)); |
| 3732 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64, |
| 3739 | 3733 | void(*)(void*), unsigned char encoding); |
| 3740 | | -SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); |
| 3741 | | -SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); |
| 3734 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); |
| 3735 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); |
| 3742 | 3736 | |
| 3743 | 3737 | /* |
| 3744 | 3738 | ** CAPI3REF: Number Of SQL Parameters |
| 3745 | 3739 | ** |
| 3746 | 3740 | ** ^This routine can be used to find the number of [SQL parameters] |
| | @@ -3756,11 +3750,11 @@ |
| 3756 | 3750 | ** |
| 3757 | 3751 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 3758 | 3752 | ** [sqlite3_bind_parameter_name()], and |
| 3759 | 3753 | ** [sqlite3_bind_parameter_index()]. |
| 3760 | 3754 | */ |
| 3761 | | -SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*); |
| 3755 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt*); |
| 3762 | 3756 | |
| 3763 | 3757 | /* |
| 3764 | 3758 | ** CAPI3REF: Name Of A Host Parameter |
| 3765 | 3759 | ** |
| 3766 | 3760 | ** ^The sqlite3_bind_parameter_name(P,N) interface returns |
| | @@ -3783,11 +3777,11 @@ |
| 3783 | 3777 | ** |
| 3784 | 3778 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 3785 | 3779 | ** [sqlite3_bind_parameter_count()], and |
| 3786 | 3780 | ** [sqlite3_bind_parameter_index()]. |
| 3787 | 3781 | */ |
| 3788 | | -SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int); |
| 3782 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt*, int); |
| 3789 | 3783 | |
| 3790 | 3784 | /* |
| 3791 | 3785 | ** CAPI3REF: Index Of A Parameter With A Given Name |
| 3792 | 3786 | ** |
| 3793 | 3787 | ** ^Return the index of an SQL parameter given its name. ^The |
| | @@ -3799,20 +3793,20 @@ |
| 3799 | 3793 | ** |
| 3800 | 3794 | ** See also: [sqlite3_bind_blob|sqlite3_bind()], |
| 3801 | 3795 | ** [sqlite3_bind_parameter_count()], and |
| 3802 | 3796 | ** [sqlite3_bind_parameter_index()]. |
| 3803 | 3797 | */ |
| 3804 | | -SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName); |
| 3798 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName); |
| 3805 | 3799 | |
| 3806 | 3800 | /* |
| 3807 | 3801 | ** CAPI3REF: Reset All Bindings On A Prepared Statement |
| 3808 | 3802 | ** |
| 3809 | 3803 | ** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset |
| 3810 | 3804 | ** the [sqlite3_bind_blob | bindings] on a [prepared statement]. |
| 3811 | 3805 | ** ^Use this routine to reset all host parameters to NULL. |
| 3812 | 3806 | */ |
| 3813 | | -SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*); |
| 3807 | +SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt*); |
| 3814 | 3808 | |
| 3815 | 3809 | /* |
| 3816 | 3810 | ** CAPI3REF: Number Of Columns In A Result Set |
| 3817 | 3811 | ** |
| 3818 | 3812 | ** ^Return the number of columns in the result set returned by the |
| | @@ -3819,11 +3813,11 @@ |
| 3819 | 3813 | ** [prepared statement]. ^This routine returns 0 if pStmt is an SQL |
| 3820 | 3814 | ** statement that does not return data (for example an [UPDATE]). |
| 3821 | 3815 | ** |
| 3822 | 3816 | ** See also: [sqlite3_data_count()] |
| 3823 | 3817 | */ |
| 3824 | | -SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt); |
| 3818 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt); |
| 3825 | 3819 | |
| 3826 | 3820 | /* |
| 3827 | 3821 | ** CAPI3REF: Column Names In A Result Set |
| 3828 | 3822 | ** |
| 3829 | 3823 | ** ^These routines return the name assigned to a particular column |
| | @@ -3847,12 +3841,12 @@ |
| 3847 | 3841 | ** ^The name of a result column is the value of the "AS" clause for |
| 3848 | 3842 | ** that column, if there is an AS clause. If there is no AS clause |
| 3849 | 3843 | ** then the name of the column is unspecified and may change from |
| 3850 | 3844 | ** one release of SQLite to the next. |
| 3851 | 3845 | */ |
| 3852 | | -SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N); |
| 3853 | | -SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N); |
| 3846 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt*, int N); |
| 3847 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt*, int N); |
| 3854 | 3848 | |
| 3855 | 3849 | /* |
| 3856 | 3850 | ** CAPI3REF: Source Of Data In A Query Result |
| 3857 | 3851 | ** |
| 3858 | 3852 | ** ^These routines provide a means to determine the database, table, and |
| | @@ -3895,16 +3889,16 @@ |
| 3895 | 3889 | ** If two or more threads call one or more |
| 3896 | 3890 | ** [sqlite3_column_database_name | column metadata interfaces] |
| 3897 | 3891 | ** for the same [prepared statement] and result column |
| 3898 | 3892 | ** at the same time then the results are undefined. |
| 3899 | 3893 | */ |
| 3900 | | -SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int); |
| 3901 | | -SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int); |
| 3902 | | -SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int); |
| 3903 | | -SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int); |
| 3904 | | -SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int); |
| 3905 | | -SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int); |
| 3894 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt*,int); |
| 3895 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt*,int); |
| 3896 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt*,int); |
| 3897 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt*,int); |
| 3898 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt*,int); |
| 3899 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt*,int); |
| 3906 | 3900 | |
| 3907 | 3901 | /* |
| 3908 | 3902 | ** CAPI3REF: Declared Datatype Of A Query Result |
| 3909 | 3903 | ** |
| 3910 | 3904 | ** ^(The first parameter is a [prepared statement]. |
| | @@ -3931,12 +3925,12 @@ |
| 3931 | 3925 | ** data stored in that column is of the declared type. SQLite is |
| 3932 | 3926 | ** strongly typed, but the typing is dynamic not static. ^Type |
| 3933 | 3927 | ** is associated with individual values, not with the containers |
| 3934 | 3928 | ** used to hold those values. |
| 3935 | 3929 | */ |
| 3936 | | -SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int); |
| 3937 | | -SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int); |
| 3930 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt*,int); |
| 3931 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt*,int); |
| 3938 | 3932 | |
| 3939 | 3933 | /* |
| 3940 | 3934 | ** CAPI3REF: Evaluate An SQL Statement |
| 3941 | 3935 | ** |
| 3942 | 3936 | ** After a [prepared statement] has been prepared using either |
| | @@ -4011,11 +4005,11 @@ |
| 4011 | 4005 | ** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead |
| 4012 | 4006 | ** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces, |
| 4013 | 4007 | ** then the more specific [error codes] are returned directly |
| 4014 | 4008 | ** by sqlite3_step(). The use of the "v2" interface is recommended. |
| 4015 | 4009 | */ |
| 4016 | | -SQLITE_API int sqlite3_step(sqlite3_stmt*); |
| 4010 | +SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt*); |
| 4017 | 4011 | |
| 4018 | 4012 | /* |
| 4019 | 4013 | ** CAPI3REF: Number of columns in a result set |
| 4020 | 4014 | ** |
| 4021 | 4015 | ** ^The sqlite3_data_count(P) interface returns the number of columns in the |
| | @@ -4031,11 +4025,11 @@ |
| 4031 | 4025 | ** where it always returns zero since each step of that multi-step |
| 4032 | 4026 | ** pragma returns 0 columns of data. |
| 4033 | 4027 | ** |
| 4034 | 4028 | ** See also: [sqlite3_column_count()] |
| 4035 | 4029 | */ |
| 4036 | | -SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt); |
| 4030 | +SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt); |
| 4037 | 4031 | |
| 4038 | 4032 | /* |
| 4039 | 4033 | ** CAPI3REF: Fundamental Datatypes |
| 4040 | 4034 | ** KEYWORDS: SQLITE_TEXT |
| 4041 | 4035 | ** |
| | @@ -4227,20 +4221,20 @@ |
| 4227 | 4221 | ** of these routines, a default value is returned. The default value |
| 4228 | 4222 | ** is either the integer 0, the floating point number 0.0, or a NULL |
| 4229 | 4223 | ** pointer. Subsequent calls to [sqlite3_errcode()] will return |
| 4230 | 4224 | ** [SQLITE_NOMEM].)^ |
| 4231 | 4225 | */ |
| 4232 | | -SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol); |
| 4233 | | -SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol); |
| 4234 | | -SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol); |
| 4235 | | -SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol); |
| 4236 | | -SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol); |
| 4237 | | -SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol); |
| 4238 | | -SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol); |
| 4239 | | -SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol); |
| 4240 | | -SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol); |
| 4241 | | -SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol); |
| 4226 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt*, int iCol); |
| 4227 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt*, int iCol); |
| 4228 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt*, int iCol); |
| 4229 | +SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt*, int iCol); |
| 4230 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt*, int iCol); |
| 4231 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt*, int iCol); |
| 4232 | +SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt*, int iCol); |
| 4233 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt*, int iCol); |
| 4234 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt*, int iCol); |
| 4235 | +SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt*, int iCol); |
| 4242 | 4236 | |
| 4243 | 4237 | /* |
| 4244 | 4238 | ** CAPI3REF: Destroy A Prepared Statement Object |
| 4245 | 4239 | ** |
| 4246 | 4240 | ** ^The sqlite3_finalize() function is called to delete a [prepared statement]. |
| | @@ -4263,11 +4257,11 @@ |
| 4263 | 4257 | ** resource leaks. It is a grievous error for the application to try to use |
| 4264 | 4258 | ** a prepared statement after it has been finalized. Any use of a prepared |
| 4265 | 4259 | ** statement after it has been finalized can result in undefined and |
| 4266 | 4260 | ** undesirable behavior such as segfaults and heap corruption. |
| 4267 | 4261 | */ |
| 4268 | | -SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt); |
| 4262 | +SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt); |
| 4269 | 4263 | |
| 4270 | 4264 | /* |
| 4271 | 4265 | ** CAPI3REF: Reset A Prepared Statement Object |
| 4272 | 4266 | ** |
| 4273 | 4267 | ** The sqlite3_reset() function is called to reset a [prepared statement] |
| | @@ -4289,11 +4283,11 @@ |
| 4289 | 4283 | ** [sqlite3_reset(S)] returns an appropriate [error code]. |
| 4290 | 4284 | ** |
| 4291 | 4285 | ** ^The [sqlite3_reset(S)] interface does not change the values |
| 4292 | 4286 | ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. |
| 4293 | 4287 | */ |
| 4294 | | -SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt); |
| 4288 | +SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt); |
| 4295 | 4289 | |
| 4296 | 4290 | /* |
| 4297 | 4291 | ** CAPI3REF: Create Or Redefine SQL Functions |
| 4298 | 4292 | ** KEYWORDS: {function creation routines} |
| 4299 | 4293 | ** KEYWORDS: {application-defined SQL function} |
| | @@ -4388,31 +4382,31 @@ |
| 4388 | 4382 | ** ^An application-defined function is permitted to call other |
| 4389 | 4383 | ** SQLite interfaces. However, such calls must not |
| 4390 | 4384 | ** close the database connection nor finalize or reset the prepared |
| 4391 | 4385 | ** statement in which the function is running. |
| 4392 | 4386 | */ |
| 4393 | | -SQLITE_API int sqlite3_create_function( |
| 4387 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_function( |
| 4394 | 4388 | sqlite3 *db, |
| 4395 | 4389 | const char *zFunctionName, |
| 4396 | 4390 | int nArg, |
| 4397 | 4391 | int eTextRep, |
| 4398 | 4392 | void *pApp, |
| 4399 | 4393 | void (*xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4400 | 4394 | void (*xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4401 | 4395 | void (*xFinal)(sqlite3_context*) |
| 4402 | 4396 | ); |
| 4403 | | -SQLITE_API int sqlite3_create_function16( |
| 4397 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_function16( |
| 4404 | 4398 | sqlite3 *db, |
| 4405 | 4399 | const void *zFunctionName, |
| 4406 | 4400 | int nArg, |
| 4407 | 4401 | int eTextRep, |
| 4408 | 4402 | void *pApp, |
| 4409 | 4403 | void (*xFunc)(sqlite3_context*,int,sqlite3_value**), |
| 4410 | 4404 | void (*xStep)(sqlite3_context*,int,sqlite3_value**), |
| 4411 | 4405 | void (*xFinal)(sqlite3_context*) |
| 4412 | 4406 | ); |
| 4413 | | -SQLITE_API int sqlite3_create_function_v2( |
| 4407 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2( |
| 4414 | 4408 | sqlite3 *db, |
| 4415 | 4409 | const char *zFunctionName, |
| 4416 | 4410 | int nArg, |
| 4417 | 4411 | int eTextRep, |
| 4418 | 4412 | void *pApp, |
| | @@ -4454,16 +4448,16 @@ |
| 4454 | 4448 | ** to be supported. However, new applications should avoid |
| 4455 | 4449 | ** the use of these functions. To encourage programmers to avoid |
| 4456 | 4450 | ** these functions, we will not explain what they do. |
| 4457 | 4451 | */ |
| 4458 | 4452 | #ifndef SQLITE_OMIT_DEPRECATED |
| 4459 | | -SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*); |
| 4460 | | -SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*); |
| 4461 | | -SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); |
| 4462 | | -SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void); |
| 4463 | | -SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void); |
| 4464 | | -SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int), |
| 4453 | +SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context*); |
| 4454 | +SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt*); |
| 4455 | +SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); |
| 4456 | +SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_global_recover(void); |
| 4457 | +SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_thread_cleanup(void); |
| 4458 | +SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int), |
| 4465 | 4459 | void*,sqlite3_int64); |
| 4466 | 4460 | #endif |
| 4467 | 4461 | |
| 4468 | 4462 | /* |
| 4469 | 4463 | ** CAPI3REF: Obtaining SQL Function Parameter Values |
| | @@ -4508,22 +4502,22 @@ |
| 4508 | 4502 | ** or [sqlite3_value_text16()]. |
| 4509 | 4503 | ** |
| 4510 | 4504 | ** These routines must be called from the same thread as |
| 4511 | 4505 | ** the SQL function that supplied the [sqlite3_value*] parameters. |
| 4512 | 4506 | */ |
| 4513 | | -SQLITE_API const void *sqlite3_value_blob(sqlite3_value*); |
| 4514 | | -SQLITE_API int sqlite3_value_bytes(sqlite3_value*); |
| 4515 | | -SQLITE_API int sqlite3_value_bytes16(sqlite3_value*); |
| 4516 | | -SQLITE_API double sqlite3_value_double(sqlite3_value*); |
| 4517 | | -SQLITE_API int sqlite3_value_int(sqlite3_value*); |
| 4518 | | -SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*); |
| 4519 | | -SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*); |
| 4520 | | -SQLITE_API const void *sqlite3_value_text16(sqlite3_value*); |
| 4521 | | -SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*); |
| 4522 | | -SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*); |
| 4523 | | -SQLITE_API int sqlite3_value_type(sqlite3_value*); |
| 4524 | | -SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*); |
| 4507 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value*); |
| 4508 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value*); |
| 4509 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value*); |
| 4510 | +SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value*); |
| 4511 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value*); |
| 4512 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value*); |
| 4513 | +SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value*); |
| 4514 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value*); |
| 4515 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value*); |
| 4516 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value*); |
| 4517 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value*); |
| 4518 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value*); |
| 4525 | 4519 | |
| 4526 | 4520 | /* |
| 4527 | 4521 | ** CAPI3REF: Obtain Aggregate Function Context |
| 4528 | 4522 | ** |
| 4529 | 4523 | ** Implementations of aggregate SQL functions use this |
| | @@ -4563,11 +4557,11 @@ |
| 4563 | 4557 | ** function. |
| 4564 | 4558 | ** |
| 4565 | 4559 | ** This routine must be called from the same thread in which |
| 4566 | 4560 | ** the aggregate SQL function is running. |
| 4567 | 4561 | */ |
| 4568 | | -SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes); |
| 4562 | +SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context*, int nBytes); |
| 4569 | 4563 | |
| 4570 | 4564 | /* |
| 4571 | 4565 | ** CAPI3REF: User Data For Functions |
| 4572 | 4566 | ** |
| 4573 | 4567 | ** ^The sqlite3_user_data() interface returns a copy of |
| | @@ -4577,11 +4571,11 @@ |
| 4577 | 4571 | ** registered the application defined function. |
| 4578 | 4572 | ** |
| 4579 | 4573 | ** This routine must be called from the same thread in which |
| 4580 | 4574 | ** the application-defined function is running. |
| 4581 | 4575 | */ |
| 4582 | | -SQLITE_API void *sqlite3_user_data(sqlite3_context*); |
| 4576 | +SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context*); |
| 4583 | 4577 | |
| 4584 | 4578 | /* |
| 4585 | 4579 | ** CAPI3REF: Database Connection For Functions |
| 4586 | 4580 | ** |
| 4587 | 4581 | ** ^The sqlite3_context_db_handle() interface returns a copy of |
| | @@ -4588,11 +4582,11 @@ |
| 4588 | 4582 | ** the pointer to the [database connection] (the 1st parameter) |
| 4589 | 4583 | ** of the [sqlite3_create_function()] |
| 4590 | 4584 | ** and [sqlite3_create_function16()] routines that originally |
| 4591 | 4585 | ** registered the application defined function. |
| 4592 | 4586 | */ |
| 4593 | | -SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*); |
| 4587 | +SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*); |
| 4594 | 4588 | |
| 4595 | 4589 | /* |
| 4596 | 4590 | ** CAPI3REF: Function Auxiliary Data |
| 4597 | 4591 | ** |
| 4598 | 4592 | ** These functions may be used by (non-aggregate) SQL functions to |
| | @@ -4640,12 +4634,12 @@ |
| 4640 | 4634 | ** values and [parameters] and expressions composed from the same.)^ |
| 4641 | 4635 | ** |
| 4642 | 4636 | ** These routines must be called from the same thread in which |
| 4643 | 4637 | ** the SQL function is running. |
| 4644 | 4638 | */ |
| 4645 | | -SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N); |
| 4646 | | -SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*)); |
| 4639 | +SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context*, int N); |
| 4640 | +SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*)); |
| 4647 | 4641 | |
| 4648 | 4642 | |
| 4649 | 4643 | /* |
| 4650 | 4644 | ** CAPI3REF: Constants Defining Special Destructor Behavior |
| 4651 | 4645 | ** |
| | @@ -4776,30 +4770,30 @@ |
| 4776 | 4770 | ** |
| 4777 | 4771 | ** If these routines are called from within the different thread |
| 4778 | 4772 | ** than the one containing the application-defined function that received |
| 4779 | 4773 | ** the [sqlite3_context] pointer, the results are undefined. |
| 4780 | 4774 | */ |
| 4781 | | -SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*)); |
| 4782 | | -SQLITE_API void sqlite3_result_blob64(sqlite3_context*,const void*, |
| 4775 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*)); |
| 4776 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64(sqlite3_context*,const void*, |
| 4783 | 4777 | sqlite3_uint64,void(*)(void*)); |
| 4784 | | -SQLITE_API void sqlite3_result_double(sqlite3_context*, double); |
| 4785 | | -SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int); |
| 4786 | | -SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int); |
| 4787 | | -SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*); |
| 4788 | | -SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*); |
| 4789 | | -SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int); |
| 4790 | | -SQLITE_API void sqlite3_result_int(sqlite3_context*, int); |
| 4791 | | -SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64); |
| 4792 | | -SQLITE_API void sqlite3_result_null(sqlite3_context*); |
| 4793 | | -SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*)); |
| 4794 | | -SQLITE_API void sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64, |
| 4778 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context*, double); |
| 4779 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context*, const char*, int); |
| 4780 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context*, const void*, int); |
| 4781 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context*); |
| 4782 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context*); |
| 4783 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context*, int); |
| 4784 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context*, int); |
| 4785 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context*, sqlite3_int64); |
| 4786 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context*); |
| 4787 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*)); |
| 4788 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64, |
| 4795 | 4789 | void(*)(void*), unsigned char encoding); |
| 4796 | | -SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*)); |
| 4797 | | -SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*)); |
| 4798 | | -SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*)); |
| 4799 | | -SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*); |
| 4800 | | -SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n); |
| 4790 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*)); |
| 4791 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*)); |
| 4792 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*)); |
| 4793 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*); |
| 4794 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n); |
| 4801 | 4795 | |
| 4802 | 4796 | /* |
| 4803 | 4797 | ** CAPI3REF: Define New Collating Sequences |
| 4804 | 4798 | ** |
| 4805 | 4799 | ** ^These functions add, remove, or modify a [collation] associated |
| | @@ -4876,26 +4870,26 @@ |
| 4876 | 4870 | ** is unfortunate but cannot be changed without breaking backwards |
| 4877 | 4871 | ** compatibility. |
| 4878 | 4872 | ** |
| 4879 | 4873 | ** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()]. |
| 4880 | 4874 | */ |
| 4881 | | -SQLITE_API int sqlite3_create_collation( |
| 4875 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_collation( |
| 4882 | 4876 | sqlite3*, |
| 4883 | 4877 | const char *zName, |
| 4884 | 4878 | int eTextRep, |
| 4885 | 4879 | void *pArg, |
| 4886 | 4880 | int(*xCompare)(void*,int,const void*,int,const void*) |
| 4887 | 4881 | ); |
| 4888 | | -SQLITE_API int sqlite3_create_collation_v2( |
| 4882 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2( |
| 4889 | 4883 | sqlite3*, |
| 4890 | 4884 | const char *zName, |
| 4891 | 4885 | int eTextRep, |
| 4892 | 4886 | void *pArg, |
| 4893 | 4887 | int(*xCompare)(void*,int,const void*,int,const void*), |
| 4894 | 4888 | void(*xDestroy)(void*) |
| 4895 | 4889 | ); |
| 4896 | | -SQLITE_API int sqlite3_create_collation16( |
| 4890 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16( |
| 4897 | 4891 | sqlite3*, |
| 4898 | 4892 | const void *zName, |
| 4899 | 4893 | int eTextRep, |
| 4900 | 4894 | void *pArg, |
| 4901 | 4895 | int(*xCompare)(void*,int,const void*,int,const void*) |
| | @@ -4925,16 +4919,16 @@ |
| 4925 | 4919 | ** |
| 4926 | 4920 | ** The callback function should register the desired collation using |
| 4927 | 4921 | ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or |
| 4928 | 4922 | ** [sqlite3_create_collation_v2()]. |
| 4929 | 4923 | */ |
| 4930 | | -SQLITE_API int sqlite3_collation_needed( |
| 4924 | +SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed( |
| 4931 | 4925 | sqlite3*, |
| 4932 | 4926 | void*, |
| 4933 | 4927 | void(*)(void*,sqlite3*,int eTextRep,const char*) |
| 4934 | 4928 | ); |
| 4935 | | -SQLITE_API int sqlite3_collation_needed16( |
| 4929 | +SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16( |
| 4936 | 4930 | sqlite3*, |
| 4937 | 4931 | void*, |
| 4938 | 4932 | void(*)(void*,sqlite3*,int eTextRep,const void*) |
| 4939 | 4933 | ); |
| 4940 | 4934 | |
| | @@ -4944,15 +4938,15 @@ |
| 4944 | 4938 | ** called right after sqlite3_open(). |
| 4945 | 4939 | ** |
| 4946 | 4940 | ** The code to implement this API is not available in the public release |
| 4947 | 4941 | ** of SQLite. |
| 4948 | 4942 | */ |
| 4949 | | -SQLITE_API int sqlite3_key( |
| 4943 | +SQLITE_API int SQLITE_STDCALL sqlite3_key( |
| 4950 | 4944 | sqlite3 *db, /* Database to be rekeyed */ |
| 4951 | 4945 | const void *pKey, int nKey /* The key */ |
| 4952 | 4946 | ); |
| 4953 | | -SQLITE_API int sqlite3_key_v2( |
| 4947 | +SQLITE_API int SQLITE_STDCALL sqlite3_key_v2( |
| 4954 | 4948 | sqlite3 *db, /* Database to be rekeyed */ |
| 4955 | 4949 | const char *zDbName, /* Name of the database */ |
| 4956 | 4950 | const void *pKey, int nKey /* The key */ |
| 4957 | 4951 | ); |
| 4958 | 4952 | |
| | @@ -4962,35 +4956,35 @@ |
| 4962 | 4956 | ** database is decrypted. |
| 4963 | 4957 | ** |
| 4964 | 4958 | ** The code to implement this API is not available in the public release |
| 4965 | 4959 | ** of SQLite. |
| 4966 | 4960 | */ |
| 4967 | | -SQLITE_API int sqlite3_rekey( |
| 4961 | +SQLITE_API int SQLITE_STDCALL sqlite3_rekey( |
| 4968 | 4962 | sqlite3 *db, /* Database to be rekeyed */ |
| 4969 | 4963 | const void *pKey, int nKey /* The new key */ |
| 4970 | 4964 | ); |
| 4971 | | -SQLITE_API int sqlite3_rekey_v2( |
| 4965 | +SQLITE_API int SQLITE_STDCALL sqlite3_rekey_v2( |
| 4972 | 4966 | sqlite3 *db, /* Database to be rekeyed */ |
| 4973 | 4967 | const char *zDbName, /* Name of the database */ |
| 4974 | 4968 | const void *pKey, int nKey /* The new key */ |
| 4975 | 4969 | ); |
| 4976 | 4970 | |
| 4977 | 4971 | /* |
| 4978 | 4972 | ** Specify the activation key for a SEE database. Unless |
| 4979 | 4973 | ** activated, none of the SEE routines will work. |
| 4980 | 4974 | */ |
| 4981 | | -SQLITE_API void sqlite3_activate_see( |
| 4975 | +SQLITE_API void SQLITE_STDCALL sqlite3_activate_see( |
| 4982 | 4976 | const char *zPassPhrase /* Activation phrase */ |
| 4983 | 4977 | ); |
| 4984 | 4978 | #endif |
| 4985 | 4979 | |
| 4986 | 4980 | #ifdef SQLITE_ENABLE_CEROD |
| 4987 | 4981 | /* |
| 4988 | 4982 | ** Specify the activation key for a CEROD database. Unless |
| 4989 | 4983 | ** activated, none of the CEROD routines will work. |
| 4990 | 4984 | */ |
| 4991 | | -SQLITE_API void sqlite3_activate_cerod( |
| 4985 | +SQLITE_API void SQLITE_STDCALL sqlite3_activate_cerod( |
| 4992 | 4986 | const char *zPassPhrase /* Activation phrase */ |
| 4993 | 4987 | ); |
| 4994 | 4988 | #endif |
| 4995 | 4989 | |
| 4996 | 4990 | /* |
| | @@ -5008,11 +5002,11 @@ |
| 5008 | 5002 | ** method of the default [sqlite3_vfs] object. If the xSleep() method |
| 5009 | 5003 | ** of the default VFS is not implemented correctly, or not implemented at |
| 5010 | 5004 | ** all, then the behavior of sqlite3_sleep() may deviate from the description |
| 5011 | 5005 | ** in the previous paragraphs. |
| 5012 | 5006 | */ |
| 5013 | | -SQLITE_API int sqlite3_sleep(int); |
| 5007 | +SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int); |
| 5014 | 5008 | |
| 5015 | 5009 | /* |
| 5016 | 5010 | ** CAPI3REF: Name Of The Folder Holding Temporary Files |
| 5017 | 5011 | ** |
| 5018 | 5012 | ** ^(If this global variable is made to point to a string which is |
| | @@ -5126,11 +5120,11 @@ |
| 5126 | 5120 | ** |
| 5127 | 5121 | ** If another thread changes the autocommit status of the database |
| 5128 | 5122 | ** connection while this routine is running, then the return value |
| 5129 | 5123 | ** is undefined. |
| 5130 | 5124 | */ |
| 5131 | | -SQLITE_API int sqlite3_get_autocommit(sqlite3*); |
| 5125 | +SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3*); |
| 5132 | 5126 | |
| 5133 | 5127 | /* |
| 5134 | 5128 | ** CAPI3REF: Find The Database Handle Of A Prepared Statement |
| 5135 | 5129 | ** |
| 5136 | 5130 | ** ^The sqlite3_db_handle interface returns the [database connection] handle |
| | @@ -5138,11 +5132,11 @@ |
| 5138 | 5132 | ** returned by sqlite3_db_handle is the same [database connection] |
| 5139 | 5133 | ** that was the first argument |
| 5140 | 5134 | ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to |
| 5141 | 5135 | ** create the statement in the first place. |
| 5142 | 5136 | */ |
| 5143 | | -SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*); |
| 5137 | +SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt*); |
| 5144 | 5138 | |
| 5145 | 5139 | /* |
| 5146 | 5140 | ** CAPI3REF: Return The Filename For A Database Connection |
| 5147 | 5141 | ** |
| 5148 | 5142 | ** ^The sqlite3_db_filename(D,N) interface returns a pointer to a filename |
| | @@ -5154,20 +5148,20 @@ |
| 5154 | 5148 | ** ^The filename returned by this function is the output of the |
| 5155 | 5149 | ** xFullPathname method of the [VFS]. ^In other words, the filename |
| 5156 | 5150 | ** will be an absolute pathname, even if the filename used |
| 5157 | 5151 | ** to open the database originally was a URI or relative pathname. |
| 5158 | 5152 | */ |
| 5159 | | -SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName); |
| 5153 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName); |
| 5160 | 5154 | |
| 5161 | 5155 | /* |
| 5162 | 5156 | ** CAPI3REF: Determine if a database is read-only |
| 5163 | 5157 | ** |
| 5164 | 5158 | ** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N |
| 5165 | 5159 | ** of connection D is read-only, 0 if it is read/write, or -1 if N is not |
| 5166 | 5160 | ** the name of a database on connection D. |
| 5167 | 5161 | */ |
| 5168 | | -SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName); |
| 5162 | +SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName); |
| 5169 | 5163 | |
| 5170 | 5164 | /* |
| 5171 | 5165 | ** CAPI3REF: Find the next prepared statement |
| 5172 | 5166 | ** |
| 5173 | 5167 | ** ^This interface returns a pointer to the next [prepared statement] after |
| | @@ -5178,11 +5172,11 @@ |
| 5178 | 5172 | ** |
| 5179 | 5173 | ** The [database connection] pointer D in a call to |
| 5180 | 5174 | ** [sqlite3_next_stmt(D,S)] must refer to an open database |
| 5181 | 5175 | ** connection and in particular must not be a NULL pointer. |
| 5182 | 5176 | */ |
| 5183 | | -SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); |
| 5177 | +SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); |
| 5184 | 5178 | |
| 5185 | 5179 | /* |
| 5186 | 5180 | ** CAPI3REF: Commit And Rollback Notification Callbacks |
| 5187 | 5181 | ** |
| 5188 | 5182 | ** ^The sqlite3_commit_hook() interface registers a callback |
| | @@ -5226,12 +5220,12 @@ |
| 5226 | 5220 | ** ^The rollback callback is not invoked if a transaction is |
| 5227 | 5221 | ** automatically rolled back because the database connection is closed. |
| 5228 | 5222 | ** |
| 5229 | 5223 | ** See also the [sqlite3_update_hook()] interface. |
| 5230 | 5224 | */ |
| 5231 | | -SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); |
| 5232 | | -SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); |
| 5225 | +SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); |
| 5226 | +SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); |
| 5233 | 5227 | |
| 5234 | 5228 | /* |
| 5235 | 5229 | ** CAPI3REF: Data Change Notification Callbacks |
| 5236 | 5230 | ** |
| 5237 | 5231 | ** ^The sqlite3_update_hook() interface registers a callback function |
| | @@ -5277,11 +5271,11 @@ |
| 5277 | 5271 | ** the first call on D. |
| 5278 | 5272 | ** |
| 5279 | 5273 | ** See also the [sqlite3_commit_hook()] and [sqlite3_rollback_hook()] |
| 5280 | 5274 | ** interfaces. |
| 5281 | 5275 | */ |
| 5282 | | -SQLITE_API void *sqlite3_update_hook( |
| 5276 | +SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook( |
| 5283 | 5277 | sqlite3*, |
| 5284 | 5278 | void(*)(void *,int ,char const *,char const *,sqlite3_int64), |
| 5285 | 5279 | void* |
| 5286 | 5280 | ); |
| 5287 | 5281 | |
| | @@ -5317,11 +5311,11 @@ |
| 5317 | 5311 | ** This interface is threadsafe on processors where writing a |
| 5318 | 5312 | ** 32-bit integer is atomic. |
| 5319 | 5313 | ** |
| 5320 | 5314 | ** See Also: [SQLite Shared-Cache Mode] |
| 5321 | 5315 | */ |
| 5322 | | -SQLITE_API int sqlite3_enable_shared_cache(int); |
| 5316 | +SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int); |
| 5323 | 5317 | |
| 5324 | 5318 | /* |
| 5325 | 5319 | ** CAPI3REF: Attempt To Free Heap Memory |
| 5326 | 5320 | ** |
| 5327 | 5321 | ** ^The sqlite3_release_memory() interface attempts to free N bytes |
| | @@ -5333,11 +5327,11 @@ |
| 5333 | 5327 | ** ^The sqlite3_release_memory() routine is a no-op returning zero |
| 5334 | 5328 | ** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT]. |
| 5335 | 5329 | ** |
| 5336 | 5330 | ** See also: [sqlite3_db_release_memory()] |
| 5337 | 5331 | */ |
| 5338 | | -SQLITE_API int sqlite3_release_memory(int); |
| 5332 | +SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int); |
| 5339 | 5333 | |
| 5340 | 5334 | /* |
| 5341 | 5335 | ** CAPI3REF: Free Memory Used By A Database Connection |
| 5342 | 5336 | ** |
| 5343 | 5337 | ** ^The sqlite3_db_release_memory(D) interface attempts to free as much heap |
| | @@ -5346,11 +5340,11 @@ |
| 5346 | 5340 | ** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is |
| 5347 | 5341 | ** omitted. |
| 5348 | 5342 | ** |
| 5349 | 5343 | ** See also: [sqlite3_release_memory()] |
| 5350 | 5344 | */ |
| 5351 | | -SQLITE_API int sqlite3_db_release_memory(sqlite3*); |
| 5345 | +SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*); |
| 5352 | 5346 | |
| 5353 | 5347 | /* |
| 5354 | 5348 | ** CAPI3REF: Impose A Limit On Heap Size |
| 5355 | 5349 | ** |
| 5356 | 5350 | ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the |
| | @@ -5398,11 +5392,11 @@ |
| 5398 | 5392 | ** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT]. |
| 5399 | 5393 | ** |
| 5400 | 5394 | ** The circumstances under which SQLite will enforce the soft heap limit may |
| 5401 | 5395 | ** changes in future releases of SQLite. |
| 5402 | 5396 | */ |
| 5403 | | -SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N); |
| 5397 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 N); |
| 5404 | 5398 | |
| 5405 | 5399 | /* |
| 5406 | 5400 | ** CAPI3REF: Deprecated Soft Heap Limit Interface |
| 5407 | 5401 | ** DEPRECATED |
| 5408 | 5402 | ** |
| | @@ -5409,11 +5403,11 @@ |
| 5409 | 5403 | ** This is a deprecated version of the [sqlite3_soft_heap_limit64()] |
| 5410 | 5404 | ** interface. This routine is provided for historical compatibility |
| 5411 | 5405 | ** only. All new applications should use the |
| 5412 | 5406 | ** [sqlite3_soft_heap_limit64()] interface rather than this one. |
| 5413 | 5407 | */ |
| 5414 | | -SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N); |
| 5408 | +SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_soft_heap_limit(int N); |
| 5415 | 5409 | |
| 5416 | 5410 | |
| 5417 | 5411 | /* |
| 5418 | 5412 | ** CAPI3REF: Extract Metadata About A Column Of A Table |
| 5419 | 5413 | ** |
| | @@ -5478,11 +5472,11 @@ |
| 5478 | 5472 | ** |
| 5479 | 5473 | ** ^This function causes all database schemas to be read from disk and |
| 5480 | 5474 | ** parsed, if that has not already been done, and returns an error if |
| 5481 | 5475 | ** any errors are encountered while loading the schema. |
| 5482 | 5476 | */ |
| 5483 | | -SQLITE_API int sqlite3_table_column_metadata( |
| 5477 | +SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata( |
| 5484 | 5478 | sqlite3 *db, /* Connection handle */ |
| 5485 | 5479 | const char *zDbName, /* Database name or NULL */ |
| 5486 | 5480 | const char *zTableName, /* Table name */ |
| 5487 | 5481 | const char *zColumnName, /* Column name */ |
| 5488 | 5482 | char const **pzDataType, /* OUTPUT: Declared data type */ |
| | @@ -5524,11 +5518,11 @@ |
| 5524 | 5518 | ** [sqlite3_enable_load_extension()] prior to calling this API, |
| 5525 | 5519 | ** otherwise an error will be returned. |
| 5526 | 5520 | ** |
| 5527 | 5521 | ** See also the [load_extension() SQL function]. |
| 5528 | 5522 | */ |
| 5529 | | -SQLITE_API int sqlite3_load_extension( |
| 5523 | +SQLITE_API int SQLITE_STDCALL sqlite3_load_extension( |
| 5530 | 5524 | sqlite3 *db, /* Load the extension into this database connection */ |
| 5531 | 5525 | const char *zFile, /* Name of the shared library containing extension */ |
| 5532 | 5526 | const char *zProc, /* Entry point. Derived from zFile if 0 */ |
| 5533 | 5527 | char **pzErrMsg /* Put error message here if not 0 */ |
| 5534 | 5528 | ); |
| | @@ -5544,11 +5538,11 @@ |
| 5544 | 5538 | ** ^Extension loading is off by default. |
| 5545 | 5539 | ** ^Call the sqlite3_enable_load_extension() routine with onoff==1 |
| 5546 | 5540 | ** to turn extension loading on and call it with onoff==0 to turn |
| 5547 | 5541 | ** it back off again. |
| 5548 | 5542 | */ |
| 5549 | | -SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff); |
| 5543 | +SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff); |
| 5550 | 5544 | |
| 5551 | 5545 | /* |
| 5552 | 5546 | ** CAPI3REF: Automatically Load Statically Linked Extensions |
| 5553 | 5547 | ** |
| 5554 | 5548 | ** ^This interface causes the xEntryPoint() function to be invoked for |
| | @@ -5582,11 +5576,11 @@ |
| 5582 | 5576 | ** will be called more than once for each database connection that is opened. |
| 5583 | 5577 | ** |
| 5584 | 5578 | ** See also: [sqlite3_reset_auto_extension()] |
| 5585 | 5579 | ** and [sqlite3_cancel_auto_extension()] |
| 5586 | 5580 | */ |
| 5587 | | -SQLITE_API int sqlite3_auto_extension(void (*xEntryPoint)(void)); |
| 5581 | +SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void (*xEntryPoint)(void)); |
| 5588 | 5582 | |
| 5589 | 5583 | /* |
| 5590 | 5584 | ** CAPI3REF: Cancel Automatic Extension Loading |
| 5591 | 5585 | ** |
| 5592 | 5586 | ** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the |
| | @@ -5594,19 +5588,19 @@ |
| 5594 | 5588 | ** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)] |
| 5595 | 5589 | ** routine returns 1 if initialization routine X was successfully |
| 5596 | 5590 | ** unregistered and it returns 0 if X was not on the list of initialization |
| 5597 | 5591 | ** routines. |
| 5598 | 5592 | */ |
| 5599 | | -SQLITE_API int sqlite3_cancel_auto_extension(void (*xEntryPoint)(void)); |
| 5593 | +SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void (*xEntryPoint)(void)); |
| 5600 | 5594 | |
| 5601 | 5595 | /* |
| 5602 | 5596 | ** CAPI3REF: Reset Automatic Extension Loading |
| 5603 | 5597 | ** |
| 5604 | 5598 | ** ^This interface disables all automatic extensions previously |
| 5605 | 5599 | ** registered using [sqlite3_auto_extension()]. |
| 5606 | 5600 | */ |
| 5607 | | -SQLITE_API void sqlite3_reset_auto_extension(void); |
| 5601 | +SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void); |
| 5608 | 5602 | |
| 5609 | 5603 | /* |
| 5610 | 5604 | ** The interface to the virtual-table mechanism is currently considered |
| 5611 | 5605 | ** to be experimental. The interface might change in incompatible ways. |
| 5612 | 5606 | ** If this is a problem for you, do not use the interface at this time. |
| | @@ -5805,17 +5799,17 @@ |
| 5805 | 5799 | ** be invoked if the call to sqlite3_create_module_v2() fails. |
| 5806 | 5800 | ** ^The sqlite3_create_module() |
| 5807 | 5801 | ** interface is equivalent to sqlite3_create_module_v2() with a NULL |
| 5808 | 5802 | ** destructor. |
| 5809 | 5803 | */ |
| 5810 | | -SQLITE_API int sqlite3_create_module( |
| 5804 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_module( |
| 5811 | 5805 | sqlite3 *db, /* SQLite connection to register module with */ |
| 5812 | 5806 | const char *zName, /* Name of the module */ |
| 5813 | 5807 | const sqlite3_module *p, /* Methods for the module */ |
| 5814 | 5808 | void *pClientData /* Client data for xCreate/xConnect */ |
| 5815 | 5809 | ); |
| 5816 | | -SQLITE_API int sqlite3_create_module_v2( |
| 5810 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2( |
| 5817 | 5811 | sqlite3 *db, /* SQLite connection to register module with */ |
| 5818 | 5812 | const char *zName, /* Name of the module */ |
| 5819 | 5813 | const sqlite3_module *p, /* Methods for the module */ |
| 5820 | 5814 | void *pClientData, /* Client data for xCreate/xConnect */ |
| 5821 | 5815 | void(*xDestroy)(void*) /* Module destructor function */ |
| | @@ -5874,11 +5868,11 @@ |
| 5874 | 5868 | ** ^The [xCreate] and [xConnect] methods of a |
| 5875 | 5869 | ** [virtual table module] call this interface |
| 5876 | 5870 | ** to declare the format (the names and datatypes of the columns) of |
| 5877 | 5871 | ** the virtual tables they implement. |
| 5878 | 5872 | */ |
| 5879 | | -SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL); |
| 5873 | +SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3*, const char *zSQL); |
| 5880 | 5874 | |
| 5881 | 5875 | /* |
| 5882 | 5876 | ** CAPI3REF: Overload A Function For A Virtual Table |
| 5883 | 5877 | ** |
| 5884 | 5878 | ** ^(Virtual tables can provide alternative implementations of functions |
| | @@ -5892,11 +5886,11 @@ |
| 5892 | 5886 | ** of the new function always causes an exception to be thrown. So |
| 5893 | 5887 | ** the new function is not good for anything by itself. Its only |
| 5894 | 5888 | ** purpose is to be a placeholder function that can be overloaded |
| 5895 | 5889 | ** by a [virtual table]. |
| 5896 | 5890 | */ |
| 5897 | | -SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg); |
| 5891 | +SQLITE_API int SQLITE_STDCALL sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg); |
| 5898 | 5892 | |
| 5899 | 5893 | /* |
| 5900 | 5894 | ** The interface to the virtual-table mechanism defined above (back up |
| 5901 | 5895 | ** to a comment remarkably similar to this one) is currently considered |
| 5902 | 5896 | ** to be experimental. The interface might change in incompatible ways. |
| | @@ -5989,11 +5983,11 @@ |
| 5989 | 5983 | ** zero-filled blob to read or write using the incremental-blob interface. |
| 5990 | 5984 | ** |
| 5991 | 5985 | ** To avoid a resource leak, every open [BLOB handle] should eventually |
| 5992 | 5986 | ** be released by a call to [sqlite3_blob_close()]. |
| 5993 | 5987 | */ |
| 5994 | | -SQLITE_API int sqlite3_blob_open( |
| 5988 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_open( |
| 5995 | 5989 | sqlite3*, |
| 5996 | 5990 | const char *zDb, |
| 5997 | 5991 | const char *zTable, |
| 5998 | 5992 | const char *zColumn, |
| 5999 | 5993 | sqlite3_int64 iRow, |
| | @@ -6021,11 +6015,11 @@ |
| 6021 | 6015 | ** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle |
| 6022 | 6016 | ** always returns zero. |
| 6023 | 6017 | ** |
| 6024 | 6018 | ** ^This function sets the database handle error code and message. |
| 6025 | 6019 | */ |
| 6026 | | -SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); |
| 6020 | +SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); |
| 6027 | 6021 | |
| 6028 | 6022 | /* |
| 6029 | 6023 | ** CAPI3REF: Close A BLOB Handle |
| 6030 | 6024 | ** |
| 6031 | 6025 | ** ^This function closes an open [BLOB handle]. ^(The BLOB handle is closed |
| | @@ -6043,11 +6037,11 @@ |
| 6043 | 6037 | ** with a null pointer (such as would be returned by a failed call to |
| 6044 | 6038 | ** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function |
| 6045 | 6039 | ** is passed a valid open blob handle, the values returned by the |
| 6046 | 6040 | ** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning. |
| 6047 | 6041 | */ |
| 6048 | | -SQLITE_API int sqlite3_blob_close(sqlite3_blob *); |
| 6042 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *); |
| 6049 | 6043 | |
| 6050 | 6044 | /* |
| 6051 | 6045 | ** CAPI3REF: Return The Size Of An Open BLOB |
| 6052 | 6046 | ** |
| 6053 | 6047 | ** ^Returns the size in bytes of the BLOB accessible via the |
| | @@ -6058,11 +6052,11 @@ |
| 6058 | 6052 | ** This routine only works on a [BLOB handle] which has been created |
| 6059 | 6053 | ** by a prior successful call to [sqlite3_blob_open()] and which has not |
| 6060 | 6054 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6061 | 6055 | ** to this routine results in undefined and probably undesirable behavior. |
| 6062 | 6056 | */ |
| 6063 | | -SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *); |
| 6057 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *); |
| 6064 | 6058 | |
| 6065 | 6059 | /* |
| 6066 | 6060 | ** CAPI3REF: Read Data From A BLOB Incrementally |
| 6067 | 6061 | ** |
| 6068 | 6062 | ** ^(This function is used to read data from an open [BLOB handle] into a |
| | @@ -6086,11 +6080,11 @@ |
| 6086 | 6080 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6087 | 6081 | ** to this routine results in undefined and probably undesirable behavior. |
| 6088 | 6082 | ** |
| 6089 | 6083 | ** See also: [sqlite3_blob_write()]. |
| 6090 | 6084 | */ |
| 6091 | | -SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset); |
| 6085 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset); |
| 6092 | 6086 | |
| 6093 | 6087 | /* |
| 6094 | 6088 | ** CAPI3REF: Write Data Into A BLOB Incrementally |
| 6095 | 6089 | ** |
| 6096 | 6090 | ** ^(This function is used to write data into an open [BLOB handle] from a |
| | @@ -6127,11 +6121,11 @@ |
| 6127 | 6121 | ** been closed by [sqlite3_blob_close()]. Passing any other pointer in |
| 6128 | 6122 | ** to this routine results in undefined and probably undesirable behavior. |
| 6129 | 6123 | ** |
| 6130 | 6124 | ** See also: [sqlite3_blob_read()]. |
| 6131 | 6125 | */ |
| 6132 | | -SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); |
| 6126 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); |
| 6133 | 6127 | |
| 6134 | 6128 | /* |
| 6135 | 6129 | ** CAPI3REF: Virtual File System Objects |
| 6136 | 6130 | ** |
| 6137 | 6131 | ** A virtual filesystem (VFS) is an [sqlite3_vfs] object |
| | @@ -6158,13 +6152,13 @@ |
| 6158 | 6152 | ** |
| 6159 | 6153 | ** ^Unregister a VFS with the sqlite3_vfs_unregister() interface. |
| 6160 | 6154 | ** ^(If the default VFS is unregistered, another VFS is chosen as |
| 6161 | 6155 | ** the default. The choice for the new VFS is arbitrary.)^ |
| 6162 | 6156 | */ |
| 6163 | | -SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName); |
| 6164 | | -SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt); |
| 6165 | | -SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*); |
| 6157 | +SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfsName); |
| 6158 | +SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs*, int makeDflt); |
| 6159 | +SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs*); |
| 6166 | 6160 | |
| 6167 | 6161 | /* |
| 6168 | 6162 | ** CAPI3REF: Mutexes |
| 6169 | 6163 | ** |
| 6170 | 6164 | ** The SQLite core uses these routines for thread |
| | @@ -6273,15 +6267,15 @@ |
| 6273 | 6267 | ** sqlite3_mutex_leave() is a NULL pointer, then all three routines |
| 6274 | 6268 | ** behave as no-ops. |
| 6275 | 6269 | ** |
| 6276 | 6270 | ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. |
| 6277 | 6271 | */ |
| 6278 | | -SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int); |
| 6279 | | -SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*); |
| 6280 | | -SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*); |
| 6281 | | -SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*); |
| 6282 | | -SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*); |
| 6272 | +SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int); |
| 6273 | +SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex*); |
| 6274 | +SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex*); |
| 6275 | +SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex*); |
| 6276 | +SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex*); |
| 6283 | 6277 | |
| 6284 | 6278 | /* |
| 6285 | 6279 | ** CAPI3REF: Mutex Methods Object |
| 6286 | 6280 | ** |
| 6287 | 6281 | ** An instance of this structure defines the low-level routines |
| | @@ -6387,12 +6381,12 @@ |
| 6387 | 6381 | ** call to sqlite3_mutex_held() to fail, so a non-zero return is |
| 6388 | 6382 | ** the appropriate thing to do. The sqlite3_mutex_notheld() |
| 6389 | 6383 | ** interface should also return 1 when given a NULL pointer. |
| 6390 | 6384 | */ |
| 6391 | 6385 | #ifndef NDEBUG |
| 6392 | | -SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*); |
| 6393 | | -SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*); |
| 6386 | +SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex*); |
| 6387 | +SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex*); |
| 6394 | 6388 | #endif |
| 6395 | 6389 | |
| 6396 | 6390 | /* |
| 6397 | 6391 | ** CAPI3REF: Mutex Types |
| 6398 | 6392 | ** |
| | @@ -6424,11 +6418,11 @@ |
| 6424 | 6418 | ** serializes access to the [database connection] given in the argument |
| 6425 | 6419 | ** when the [threading mode] is Serialized. |
| 6426 | 6420 | ** ^If the [threading mode] is Single-thread or Multi-thread then this |
| 6427 | 6421 | ** routine returns a NULL pointer. |
| 6428 | 6422 | */ |
| 6429 | | -SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*); |
| 6423 | +SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3*); |
| 6430 | 6424 | |
| 6431 | 6425 | /* |
| 6432 | 6426 | ** CAPI3REF: Low-Level Control Of Database Files |
| 6433 | 6427 | ** |
| 6434 | 6428 | ** ^The [sqlite3_file_control()] interface makes a direct call to the |
| | @@ -6458,11 +6452,11 @@ |
| 6458 | 6452 | ** an incorrect zDbName and an SQLITE_ERROR return from the underlying |
| 6459 | 6453 | ** xFileControl method. |
| 6460 | 6454 | ** |
| 6461 | 6455 | ** See also: [SQLITE_FCNTL_LOCKSTATE] |
| 6462 | 6456 | */ |
| 6463 | | -SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*); |
| 6457 | +SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*); |
| 6464 | 6458 | |
| 6465 | 6459 | /* |
| 6466 | 6460 | ** CAPI3REF: Testing Interface |
| 6467 | 6461 | ** |
| 6468 | 6462 | ** ^The sqlite3_test_control() interface is used to read out internal |
| | @@ -6477,11 +6471,11 @@ |
| 6477 | 6471 | ** The details of the operation codes, their meanings, the parameters |
| 6478 | 6472 | ** they take, and what they do are all subject to change without notice. |
| 6479 | 6473 | ** Unlike most of the SQLite API, this function is not guaranteed to |
| 6480 | 6474 | ** operate consistently from one release to the next. |
| 6481 | 6475 | */ |
| 6482 | | -SQLITE_API int sqlite3_test_control(int op, ...); |
| 6476 | +SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...); |
| 6483 | 6477 | |
| 6484 | 6478 | /* |
| 6485 | 6479 | ** CAPI3REF: Testing Interface Operation Codes |
| 6486 | 6480 | ** |
| 6487 | 6481 | ** These constants are the valid operation code parameters used |
| | @@ -6540,12 +6534,12 @@ |
| 6540 | 6534 | ** be represented by a 32-bit integer, then the values returned by |
| 6541 | 6535 | ** sqlite3_status() are undefined. |
| 6542 | 6536 | ** |
| 6543 | 6537 | ** See also: [sqlite3_db_status()] |
| 6544 | 6538 | */ |
| 6545 | | -SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag); |
| 6546 | | -SQLITE_API int sqlite3_status64( |
| 6539 | +SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag); |
| 6540 | +SQLITE_API int SQLITE_STDCALL sqlite3_status64( |
| 6547 | 6541 | int op, |
| 6548 | 6542 | sqlite3_int64 *pCurrent, |
| 6549 | 6543 | sqlite3_int64 *pHighwater, |
| 6550 | 6544 | int resetFlag |
| 6551 | 6545 | ); |
| | @@ -6664,11 +6658,11 @@ |
| 6664 | 6658 | ** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a |
| 6665 | 6659 | ** non-zero [error code] on failure. |
| 6666 | 6660 | ** |
| 6667 | 6661 | ** See also: [sqlite3_status()] and [sqlite3_stmt_status()]. |
| 6668 | 6662 | */ |
| 6669 | | -SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg); |
| 6663 | +SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg); |
| 6670 | 6664 | |
| 6671 | 6665 | /* |
| 6672 | 6666 | ** CAPI3REF: Status Parameters for database connections |
| 6673 | 6667 | ** KEYWORDS: {SQLITE_DBSTATUS options} |
| 6674 | 6668 | ** |
| | @@ -6793,11 +6787,11 @@ |
| 6793 | 6787 | ** ^If the resetFlg is true, then the counter is reset to zero after this |
| 6794 | 6788 | ** interface call returns. |
| 6795 | 6789 | ** |
| 6796 | 6790 | ** See also: [sqlite3_status()] and [sqlite3_db_status()]. |
| 6797 | 6791 | */ |
| 6798 | | -SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg); |
| 6792 | +SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg); |
| 6799 | 6793 | |
| 6800 | 6794 | /* |
| 6801 | 6795 | ** CAPI3REF: Status Parameters for prepared statements |
| 6802 | 6796 | ** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters} |
| 6803 | 6797 | ** |
| | @@ -7262,20 +7256,20 @@ |
| 7262 | 7256 | ** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount() |
| 7263 | 7257 | ** APIs are not strictly speaking threadsafe. If they are invoked at the |
| 7264 | 7258 | ** same time as another thread is invoking sqlite3_backup_step() it is |
| 7265 | 7259 | ** possible that they return invalid values. |
| 7266 | 7260 | */ |
| 7267 | | -SQLITE_API sqlite3_backup *sqlite3_backup_init( |
| 7261 | +SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init( |
| 7268 | 7262 | sqlite3 *pDest, /* Destination database handle */ |
| 7269 | 7263 | const char *zDestName, /* Destination database name */ |
| 7270 | 7264 | sqlite3 *pSource, /* Source database handle */ |
| 7271 | 7265 | const char *zSourceName /* Source database name */ |
| 7272 | 7266 | ); |
| 7273 | | -SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage); |
| 7274 | | -SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p); |
| 7275 | | -SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p); |
| 7276 | | -SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p); |
| 7267 | +SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage); |
| 7268 | +SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p); |
| 7269 | +SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p); |
| 7270 | +SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p); |
| 7277 | 7271 | |
| 7278 | 7272 | /* |
| 7279 | 7273 | ** CAPI3REF: Unlock Notification |
| 7280 | 7274 | ** |
| 7281 | 7275 | ** ^When running in shared-cache mode, a database operation may fail with |
| | @@ -7387,11 +7381,11 @@ |
| 7387 | 7381 | ** by an sqlite3_step() call. ^(If there is a blocking connection, then the |
| 7388 | 7382 | ** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in |
| 7389 | 7383 | ** the special "DROP TABLE/INDEX" case, the extended error code is just |
| 7390 | 7384 | ** SQLITE_LOCKED.)^ |
| 7391 | 7385 | */ |
| 7392 | | -SQLITE_API int sqlite3_unlock_notify( |
| 7386 | +SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify( |
| 7393 | 7387 | sqlite3 *pBlocked, /* Waiting connection */ |
| 7394 | 7388 | void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */ |
| 7395 | 7389 | void *pNotifyArg /* Argument to pass to xNotify */ |
| 7396 | 7390 | ); |
| 7397 | 7391 | |
| | @@ -7402,12 +7396,12 @@ |
| 7402 | 7396 | ** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications |
| 7403 | 7397 | ** and extensions to compare the contents of two buffers containing UTF-8 |
| 7404 | 7398 | ** strings in a case-independent fashion, using the same definition of "case |
| 7405 | 7399 | ** independence" that SQLite uses internally when comparing identifiers. |
| 7406 | 7400 | */ |
| 7407 | | -SQLITE_API int sqlite3_stricmp(const char *, const char *); |
| 7408 | | -SQLITE_API int sqlite3_strnicmp(const char *, const char *, int); |
| 7401 | +SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *, const char *); |
| 7402 | +SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *, const char *, int); |
| 7409 | 7403 | |
| 7410 | 7404 | /* |
| 7411 | 7405 | ** CAPI3REF: String Globbing |
| 7412 | 7406 | * |
| 7413 | 7407 | ** ^The [sqlite3_strglob(P,X)] interface returns zero if string X matches |
| | @@ -7418,11 +7412,11 @@ |
| 7418 | 7412 | ** sensitive. |
| 7419 | 7413 | ** |
| 7420 | 7414 | ** Note that this routine returns zero on a match and non-zero if the strings |
| 7421 | 7415 | ** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. |
| 7422 | 7416 | */ |
| 7423 | | -SQLITE_API int sqlite3_strglob(const char *zGlob, const char *zStr); |
| 7417 | +SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlob, const char *zStr); |
| 7424 | 7418 | |
| 7425 | 7419 | /* |
| 7426 | 7420 | ** CAPI3REF: Error Logging Interface |
| 7427 | 7421 | ** |
| 7428 | 7422 | ** ^The [sqlite3_log()] interface writes a message into the [error log] |
| | @@ -7441,11 +7435,11 @@ |
| 7441 | 7435 | ** will not use dynamically allocated memory. The log message is stored in |
| 7442 | 7436 | ** a fixed-length buffer on the stack. If the log message is longer than |
| 7443 | 7437 | ** a few hundred characters, it will be truncated to the length of the |
| 7444 | 7438 | ** buffer. |
| 7445 | 7439 | */ |
| 7446 | | -SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...); |
| 7440 | +SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...); |
| 7447 | 7441 | |
| 7448 | 7442 | /* |
| 7449 | 7443 | ** CAPI3REF: Write-Ahead Log Commit Hook |
| 7450 | 7444 | ** |
| 7451 | 7445 | ** ^The [sqlite3_wal_hook()] function is used to register a callback that |
| | @@ -7476,11 +7470,11 @@ |
| 7476 | 7470 | ** previously registered write-ahead log callback. ^Note that the |
| 7477 | 7471 | ** [sqlite3_wal_autocheckpoint()] interface and the |
| 7478 | 7472 | ** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will |
| 7479 | 7473 | ** those overwrite any prior [sqlite3_wal_hook()] settings. |
| 7480 | 7474 | */ |
| 7481 | | -SQLITE_API void *sqlite3_wal_hook( |
| 7475 | +SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook( |
| 7482 | 7476 | sqlite3*, |
| 7483 | 7477 | int(*)(void *,sqlite3*,const char*,int), |
| 7484 | 7478 | void* |
| 7485 | 7479 | ); |
| 7486 | 7480 | |
| | @@ -7510,11 +7504,11 @@ |
| 7510 | 7504 | ** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT] |
| 7511 | 7505 | ** pages. The use of this interface |
| 7512 | 7506 | ** is only necessary if the default setting is found to be suboptimal |
| 7513 | 7507 | ** for a particular application. |
| 7514 | 7508 | */ |
| 7515 | | -SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N); |
| 7509 | +SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N); |
| 7516 | 7510 | |
| 7517 | 7511 | /* |
| 7518 | 7512 | ** CAPI3REF: Checkpoint a database |
| 7519 | 7513 | ** |
| 7520 | 7514 | ** ^(The sqlite3_wal_checkpoint(D,X) is equivalent to |
| | @@ -7531,11 +7525,11 @@ |
| 7531 | 7525 | ** interface was added. This interface is retained for backwards |
| 7532 | 7526 | ** compatibility and as a convenience for applications that need to manually |
| 7533 | 7527 | ** start a callback but which do not need the full power (and corresponding |
| 7534 | 7528 | ** complication) of [sqlite3_wal_checkpoint_v2()]. |
| 7535 | 7529 | */ |
| 7536 | | -SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb); |
| 7530 | +SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb); |
| 7537 | 7531 | |
| 7538 | 7532 | /* |
| 7539 | 7533 | ** CAPI3REF: Checkpoint a database |
| 7540 | 7534 | ** |
| 7541 | 7535 | ** ^(The sqlite3_wal_checkpoint_v2(D,X,M,L,C) interface runs a checkpoint |
| | @@ -7624,11 +7618,11 @@ |
| 7624 | 7618 | ** [sqlite3_errcode()] and [sqlite3_errmsg()]. |
| 7625 | 7619 | ** |
| 7626 | 7620 | ** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface |
| 7627 | 7621 | ** from SQL. |
| 7628 | 7622 | */ |
| 7629 | | -SQLITE_API int sqlite3_wal_checkpoint_v2( |
| 7623 | +SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2( |
| 7630 | 7624 | sqlite3 *db, /* Database handle */ |
| 7631 | 7625 | const char *zDb, /* Name of attached database (or NULL) */ |
| 7632 | 7626 | int eMode, /* SQLITE_CHECKPOINT_* value */ |
| 7633 | 7627 | int *pnLog, /* OUT: Size of WAL log in frames */ |
| 7634 | 7628 | int *pnCkpt /* OUT: Total number of frames checkpointed */ |
| | @@ -7660,11 +7654,11 @@ |
| 7660 | 7654 | ** |
| 7661 | 7655 | ** At present, there is only one option that may be configured using |
| 7662 | 7656 | ** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options |
| 7663 | 7657 | ** may be added in the future. |
| 7664 | 7658 | */ |
| 7665 | | -SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...); |
| 7659 | +SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3*, int op, ...); |
| 7666 | 7660 | |
| 7667 | 7661 | /* |
| 7668 | 7662 | ** CAPI3REF: Virtual Table Configuration Options |
| 7669 | 7663 | ** |
| 7670 | 7664 | ** These macros define the various options to the |
| | @@ -7713,11 +7707,11 @@ |
| 7713 | 7707 | ** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL], |
| 7714 | 7708 | ** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode |
| 7715 | 7709 | ** of the SQL statement that triggered the call to the [xUpdate] method of the |
| 7716 | 7710 | ** [virtual table]. |
| 7717 | 7711 | */ |
| 7718 | | -SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *); |
| 7712 | +SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *); |
| 7719 | 7713 | |
| 7720 | 7714 | /* |
| 7721 | 7715 | ** CAPI3REF: Conflict resolution modes |
| 7722 | 7716 | ** KEYWORDS: {conflict resolution mode} |
| 7723 | 7717 | ** |
| | @@ -7817,11 +7811,11 @@ |
| 7817 | 7811 | ** as if the loop did not exist - it returns non-zero and leave the variable |
| 7818 | 7812 | ** that pOut points to unchanged. |
| 7819 | 7813 | ** |
| 7820 | 7814 | ** See also: [sqlite3_stmt_scanstatus_reset()] |
| 7821 | 7815 | */ |
| 7822 | | -SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_stmt_scanstatus( |
| 7816 | +SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_stmt_scanstatus( |
| 7823 | 7817 | sqlite3_stmt *pStmt, /* Prepared statement for which info desired */ |
| 7824 | 7818 | int idx, /* Index of loop to report on */ |
| 7825 | 7819 | int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */ |
| 7826 | 7820 | void *pOut /* Result written here */ |
| 7827 | 7821 | ); |
| | @@ -7832,11 +7826,11 @@ |
| 7832 | 7826 | ** ^Zero all [sqlite3_stmt_scanstatus()] related event counters. |
| 7833 | 7827 | ** |
| 7834 | 7828 | ** This API is only available if the library is built with pre-processor |
| 7835 | 7829 | ** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined. |
| 7836 | 7830 | */ |
| 7837 | | -SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); |
| 7831 | +SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); |
| 7838 | 7832 | |
| 7839 | 7833 | |
| 7840 | 7834 | /* |
| 7841 | 7835 | ** Undo the hack that converts floating point types to integer for |
| 7842 | 7836 | ** builds on processors without floating point support. |
| | @@ -7887,11 +7881,11 @@ |
| 7887 | 7881 | ** Register a geometry callback named zGeom that can be used as part of an |
| 7888 | 7882 | ** R-Tree geometry query as follows: |
| 7889 | 7883 | ** |
| 7890 | 7884 | ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...) |
| 7891 | 7885 | */ |
| 7892 | | -SQLITE_API int sqlite3_rtree_geometry_callback( |
| 7886 | +SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback( |
| 7893 | 7887 | sqlite3 *db, |
| 7894 | 7888 | const char *zGeom, |
| 7895 | 7889 | int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*), |
| 7896 | 7890 | void *pContext |
| 7897 | 7891 | ); |
| | @@ -7913,11 +7907,11 @@ |
| 7913 | 7907 | ** Register a 2nd-generation geometry callback named zScore that can be |
| 7914 | 7908 | ** used as part of an R-Tree geometry query as follows: |
| 7915 | 7909 | ** |
| 7916 | 7910 | ** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...) |
| 7917 | 7911 | */ |
| 7918 | | -SQLITE_API int sqlite3_rtree_query_callback( |
| 7912 | +SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback( |
| 7919 | 7913 | sqlite3 *db, |
| 7920 | 7914 | const char *zQueryFunc, |
| 7921 | 7915 | int (*xQueryFunc)(sqlite3_rtree_query_info*), |
| 7922 | 7916 | void *pContext, |
| 7923 | 7917 | void (*xDestructor)(void*) |
| | @@ -9157,12 +9151,12 @@ |
| 9157 | 9151 | */ |
| 9158 | 9152 | #ifdef SQLITE_OMIT_WSD |
| 9159 | 9153 | #define SQLITE_WSD const |
| 9160 | 9154 | #define GLOBAL(t,v) (*(t*)sqlite3_wsd_find((void*)&(v), sizeof(v))) |
| 9161 | 9155 | #define sqlite3GlobalConfig GLOBAL(struct Sqlite3Config, sqlite3Config) |
| 9162 | | -SQLITE_API int sqlite3_wsd_init(int N, int J); |
| 9163 | | -SQLITE_API void *sqlite3_wsd_find(void *K, int L); |
| 9156 | +SQLITE_API int SQLITE_STDCALL sqlite3_wsd_init(int N, int J); |
| 9157 | +SQLITE_API void *SQLITE_STDCALL sqlite3_wsd_find(void *K, int L); |
| 9164 | 9158 | #else |
| 9165 | 9159 | #define SQLITE_WSD |
| 9166 | 9160 | #define GLOBAL(t,v) v |
| 9167 | 9161 | #define sqlite3GlobalConfig sqlite3Config |
| 9168 | 9162 | #endif |
| | @@ -13646,11 +13640,11 @@ |
| 13646 | 13640 | ** print I/O tracing messages. |
| 13647 | 13641 | */ |
| 13648 | 13642 | #ifdef SQLITE_ENABLE_IOTRACE |
| 13649 | 13643 | # define IOTRACE(A) if( sqlite3IoTrace ){ sqlite3IoTrace A; } |
| 13650 | 13644 | SQLITE_PRIVATE void sqlite3VdbeIOTraceSql(Vdbe*); |
| 13651 | | -void (*sqlite3IoTrace)(const char*,...); |
| 13645 | +SQLITE_API SQLITE_EXTERN void (SQLITE_CDECL *sqlite3IoTrace)(const char*,...); |
| 13652 | 13646 | #else |
| 13653 | 13647 | # define IOTRACE(A) |
| 13654 | 13648 | # define sqlite3VdbeIOTraceSql(X) |
| 13655 | 13649 | #endif |
| 13656 | 13650 | |
| | @@ -14359,11 +14353,11 @@ |
| 14359 | 14353 | ** was used and false if not. |
| 14360 | 14354 | ** |
| 14361 | 14355 | ** The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix |
| 14362 | 14356 | ** is not required for a match. |
| 14363 | 14357 | */ |
| 14364 | | -SQLITE_API int sqlite3_compileoption_used(const char *zOptName){ |
| 14358 | +SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName){ |
| 14365 | 14359 | int i, n; |
| 14366 | 14360 | |
| 14367 | 14361 | #if SQLITE_ENABLE_API_ARMOR |
| 14368 | 14362 | if( zOptName==0 ){ |
| 14369 | 14363 | (void)SQLITE_MISUSE_BKPT; |
| | @@ -14387,11 +14381,11 @@ |
| 14387 | 14381 | |
| 14388 | 14382 | /* |
| 14389 | 14383 | ** Return the N-th compile-time option string. If N is out of range, |
| 14390 | 14384 | ** return a NULL pointer. |
| 14391 | 14385 | */ |
| 14392 | | -SQLITE_API const char *sqlite3_compileoption_get(int N){ |
| 14386 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N){ |
| 14393 | 14387 | if( N>=0 && N<ArraySize(azCompileOpt) ){ |
| 14394 | 14388 | return azCompileOpt[N]; |
| 14395 | 14389 | } |
| 14396 | 14390 | return 0; |
| 14397 | 14391 | } |
| | @@ -15024,11 +15018,11 @@ |
| 15024 | 15018 | } |
| 15025 | 15019 | |
| 15026 | 15020 | /* |
| 15027 | 15021 | ** Query status information. |
| 15028 | 15022 | */ |
| 15029 | | -SQLITE_API int sqlite3_status64( |
| 15023 | +SQLITE_API int SQLITE_STDCALL sqlite3_status64( |
| 15030 | 15024 | int op, |
| 15031 | 15025 | sqlite3_int64 *pCurrent, |
| 15032 | 15026 | sqlite3_int64 *pHighwater, |
| 15033 | 15027 | int resetFlag |
| 15034 | 15028 | ){ |
| | @@ -15049,11 +15043,11 @@ |
| 15049 | 15043 | } |
| 15050 | 15044 | sqlite3_mutex_leave(pMutex); |
| 15051 | 15045 | (void)pMutex; /* Prevent warning when SQLITE_THREADSAFE=0 */ |
| 15052 | 15046 | return SQLITE_OK; |
| 15053 | 15047 | } |
| 15054 | | -SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag){ |
| 15048 | +SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag){ |
| 15055 | 15049 | sqlite3_int64 iCur, iHwtr; |
| 15056 | 15050 | int rc; |
| 15057 | 15051 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 15058 | 15052 | if( pCurrent==0 || pHighwater==0 ) return SQLITE_MISUSE_BKPT; |
| 15059 | 15053 | #endif |
| | @@ -15066,11 +15060,11 @@ |
| 15066 | 15060 | } |
| 15067 | 15061 | |
| 15068 | 15062 | /* |
| 15069 | 15063 | ** Query status information for a single database connection |
| 15070 | 15064 | */ |
| 15071 | | -SQLITE_API int sqlite3_db_status( |
| 15065 | +SQLITE_API int SQLITE_STDCALL sqlite3_db_status( |
| 15072 | 15066 | sqlite3 *db, /* The database connection whose status is desired */ |
| 15073 | 15067 | int op, /* Status verb */ |
| 15074 | 15068 | int *pCurrent, /* Write current value here */ |
| 15075 | 15069 | int *pHighwater, /* Write high-water mark here */ |
| 15076 | 15070 | int resetFlag /* Reset high-water mark if true */ |
| | @@ -16690,11 +16684,11 @@ |
| 16690 | 16684 | |
| 16691 | 16685 | /* |
| 16692 | 16686 | ** Locate a VFS by name. If no name is given, simply return the |
| 16693 | 16687 | ** first VFS on the list. |
| 16694 | 16688 | */ |
| 16695 | | -SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfs){ |
| 16689 | +SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfs){ |
| 16696 | 16690 | sqlite3_vfs *pVfs = 0; |
| 16697 | 16691 | #if SQLITE_THREADSAFE |
| 16698 | 16692 | sqlite3_mutex *mutex; |
| 16699 | 16693 | #endif |
| 16700 | 16694 | #ifndef SQLITE_OMIT_AUTOINIT |
| | @@ -16736,11 +16730,11 @@ |
| 16736 | 16730 | /* |
| 16737 | 16731 | ** Register a VFS with the system. It is harmless to register the same |
| 16738 | 16732 | ** VFS multiple times. The new VFS becomes the default if makeDflt is |
| 16739 | 16733 | ** true. |
| 16740 | 16734 | */ |
| 16741 | | -SQLITE_API int sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){ |
| 16735 | +SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){ |
| 16742 | 16736 | MUTEX_LOGIC(sqlite3_mutex *mutex;) |
| 16743 | 16737 | #ifndef SQLITE_OMIT_AUTOINIT |
| 16744 | 16738 | int rc = sqlite3_initialize(); |
| 16745 | 16739 | if( rc ) return rc; |
| 16746 | 16740 | #endif |
| | @@ -16764,11 +16758,11 @@ |
| 16764 | 16758 | } |
| 16765 | 16759 | |
| 16766 | 16760 | /* |
| 16767 | 16761 | ** Unregister a VFS so that it is no longer accessible. |
| 16768 | 16762 | */ |
| 16769 | | -SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs *pVfs){ |
| 16763 | +SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs *pVfs){ |
| 16770 | 16764 | #if SQLITE_THREADSAFE |
| 16771 | 16765 | sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); |
| 16772 | 16766 | #endif |
| 16773 | 16767 | sqlite3_mutex_enter(mutex); |
| 16774 | 16768 | vfsUnlink(pVfs); |
| | @@ -19100,11 +19094,11 @@ |
| 19100 | 19094 | } |
| 19101 | 19095 | |
| 19102 | 19096 | /* |
| 19103 | 19097 | ** Retrieve a pointer to a static mutex or allocate a new dynamic one. |
| 19104 | 19098 | */ |
| 19105 | | -SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int id){ |
| 19099 | +SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int id){ |
| 19106 | 19100 | #ifndef SQLITE_OMIT_AUTOINIT |
| 19107 | 19101 | if( id<=SQLITE_MUTEX_RECURSIVE && sqlite3_initialize() ) return 0; |
| 19108 | 19102 | if( id>SQLITE_MUTEX_RECURSIVE && sqlite3MutexInit() ) return 0; |
| 19109 | 19103 | #endif |
| 19110 | 19104 | return sqlite3GlobalConfig.mutex.xMutexAlloc(id); |
| | @@ -19119,31 +19113,31 @@ |
| 19119 | 19113 | } |
| 19120 | 19114 | |
| 19121 | 19115 | /* |
| 19122 | 19116 | ** Free a dynamic mutex. |
| 19123 | 19117 | */ |
| 19124 | | -SQLITE_API void sqlite3_mutex_free(sqlite3_mutex *p){ |
| 19118 | +SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex *p){ |
| 19125 | 19119 | if( p ){ |
| 19126 | 19120 | sqlite3GlobalConfig.mutex.xMutexFree(p); |
| 19127 | 19121 | } |
| 19128 | 19122 | } |
| 19129 | 19123 | |
| 19130 | 19124 | /* |
| 19131 | 19125 | ** Obtain the mutex p. If some other thread already has the mutex, block |
| 19132 | 19126 | ** until it can be obtained. |
| 19133 | 19127 | */ |
| 19134 | | -SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex *p){ |
| 19128 | +SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex *p){ |
| 19135 | 19129 | if( p ){ |
| 19136 | 19130 | sqlite3GlobalConfig.mutex.xMutexEnter(p); |
| 19137 | 19131 | } |
| 19138 | 19132 | } |
| 19139 | 19133 | |
| 19140 | 19134 | /* |
| 19141 | 19135 | ** Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another |
| 19142 | 19136 | ** thread holds the mutex and it cannot be obtained, return SQLITE_BUSY. |
| 19143 | 19137 | */ |
| 19144 | | -SQLITE_API int sqlite3_mutex_try(sqlite3_mutex *p){ |
| 19138 | +SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex *p){ |
| 19145 | 19139 | int rc = SQLITE_OK; |
| 19146 | 19140 | if( p ){ |
| 19147 | 19141 | return sqlite3GlobalConfig.mutex.xMutexTry(p); |
| 19148 | 19142 | } |
| 19149 | 19143 | return rc; |
| | @@ -19153,11 +19147,11 @@ |
| 19153 | 19147 | ** The sqlite3_mutex_leave() routine exits a mutex that was previously |
| 19154 | 19148 | ** entered by the same thread. The behavior is undefined if the mutex |
| 19155 | 19149 | ** is not currently entered. If a NULL pointer is passed as an argument |
| 19156 | 19150 | ** this function is a no-op. |
| 19157 | 19151 | */ |
| 19158 | | -SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex *p){ |
| 19152 | +SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex *p){ |
| 19159 | 19153 | if( p ){ |
| 19160 | 19154 | sqlite3GlobalConfig.mutex.xMutexLeave(p); |
| 19161 | 19155 | } |
| 19162 | 19156 | } |
| 19163 | 19157 | |
| | @@ -19164,14 +19158,14 @@ |
| 19164 | 19158 | #ifndef NDEBUG |
| 19165 | 19159 | /* |
| 19166 | 19160 | ** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are |
| 19167 | 19161 | ** intended for use inside assert() statements. |
| 19168 | 19162 | */ |
| 19169 | | -SQLITE_API int sqlite3_mutex_held(sqlite3_mutex *p){ |
| 19163 | +SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex *p){ |
| 19170 | 19164 | return p==0 || sqlite3GlobalConfig.mutex.xMutexHeld(p); |
| 19171 | 19165 | } |
| 19172 | | -SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex *p){ |
| 19166 | +SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex *p){ |
| 19173 | 19167 | return p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld(p); |
| 19174 | 19168 | } |
| 19175 | 19169 | #endif |
| 19176 | 19170 | |
| 19177 | 19171 | #endif /* !defined(SQLITE_MUTEX_OMIT) */ |
| | @@ -20163,12 +20157,12 @@ |
| 20163 | 20157 | ** of the sqlite3_initialize() and sqlite3_shutdown() processing, the |
| 20164 | 20158 | ** "interlocked" magic used here is probably not strictly necessary. |
| 20165 | 20159 | */ |
| 20166 | 20160 | static LONG SQLITE_WIN32_VOLATILE winMutex_lock = 0; |
| 20167 | 20161 | |
| 20168 | | -SQLITE_API int sqlite3_win32_is_nt(void); /* os_win.c */ |
| 20169 | | -SQLITE_API void sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */ |
| 20162 | +SQLITE_API int SQLITE_STDCALL sqlite3_win32_is_nt(void); /* os_win.c */ |
| 20163 | +SQLITE_API void SQLITE_STDCALL sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */ |
| 20170 | 20164 | |
| 20171 | 20165 | static int winMutexInit(void){ |
| 20172 | 20166 | /* The first to increment to 1 does actual initialization */ |
| 20173 | 20167 | if( InterlockedCompareExchange(&winMutex_lock, 1, 0)==0 ){ |
| 20174 | 20168 | int i; |
| | @@ -20460,11 +20454,11 @@ |
| 20460 | 20454 | /* |
| 20461 | 20455 | ** Attempt to release up to n bytes of non-essential memory currently |
| 20462 | 20456 | ** held by SQLite. An example of non-essential memory is memory used to |
| 20463 | 20457 | ** cache database pages that are not currently in use. |
| 20464 | 20458 | */ |
| 20465 | | -SQLITE_API int sqlite3_release_memory(int n){ |
| 20459 | +SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int n){ |
| 20466 | 20460 | #ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT |
| 20467 | 20461 | return sqlite3PcacheReleaseMemory(n); |
| 20468 | 20462 | #else |
| 20469 | 20463 | /* IMPLEMENTATION-OF: R-34391-24921 The sqlite3_release_memory() routine |
| 20470 | 20464 | ** is a no-op returning zero if SQLite is not compiled with |
| | @@ -20560,11 +20554,11 @@ |
| 20560 | 20554 | #ifndef SQLITE_OMIT_DEPRECATED |
| 20561 | 20555 | /* |
| 20562 | 20556 | ** Deprecated external interface. Internal/core SQLite code |
| 20563 | 20557 | ** should call sqlite3MemoryAlarm. |
| 20564 | 20558 | */ |
| 20565 | | -SQLITE_API int sqlite3_memory_alarm( |
| 20559 | +SQLITE_API int SQLITE_STDCALL sqlite3_memory_alarm( |
| 20566 | 20560 | void(*xCallback)(void *pArg, sqlite3_int64 used,int N), |
| 20567 | 20561 | void *pArg, |
| 20568 | 20562 | sqlite3_int64 iThreshold |
| 20569 | 20563 | ){ |
| 20570 | 20564 | return sqlite3MemoryAlarm(xCallback, pArg, iThreshold); |
| | @@ -20573,11 +20567,11 @@ |
| 20573 | 20567 | |
| 20574 | 20568 | /* |
| 20575 | 20569 | ** Set the soft heap-size limit for the library. Passing a zero or |
| 20576 | 20570 | ** negative value indicates no limit. |
| 20577 | 20571 | */ |
| 20578 | | -SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 n){ |
| 20572 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 n){ |
| 20579 | 20573 | sqlite3_int64 priorLimit; |
| 20580 | 20574 | sqlite3_int64 excess; |
| 20581 | 20575 | #ifndef SQLITE_OMIT_AUTOINIT |
| 20582 | 20576 | int rc = sqlite3_initialize(); |
| 20583 | 20577 | if( rc ) return -1; |
| | @@ -20593,19 +20587,20 @@ |
| 20593 | 20587 | } |
| 20594 | 20588 | excess = sqlite3_memory_used() - n; |
| 20595 | 20589 | if( excess>0 ) sqlite3_release_memory((int)(excess & 0x7fffffff)); |
| 20596 | 20590 | return priorLimit; |
| 20597 | 20591 | } |
| 20598 | | -SQLITE_API void sqlite3_soft_heap_limit(int n){ |
| 20592 | +SQLITE_API void SQLITE_STDCALL sqlite3_soft_heap_limit(int n){ |
| 20599 | 20593 | if( n<0 ) n = 0; |
| 20600 | 20594 | sqlite3_soft_heap_limit64(n); |
| 20601 | 20595 | } |
| 20602 | 20596 | |
| 20603 | 20597 | /* |
| 20604 | 20598 | ** Initialize the memory allocation subsystem. |
| 20605 | 20599 | */ |
| 20606 | 20600 | SQLITE_PRIVATE int sqlite3MallocInit(void){ |
| 20601 | + int rc; |
| 20607 | 20602 | if( sqlite3GlobalConfig.m.xMalloc==0 ){ |
| 20608 | 20603 | sqlite3MemSetDefault(); |
| 20609 | 20604 | } |
| 20610 | 20605 | memset(&mem0, 0, sizeof(mem0)); |
| 20611 | 20606 | if( sqlite3GlobalConfig.bCoreMutex ){ |
| | @@ -20637,11 +20632,13 @@ |
| 20637 | 20632 | || sqlite3GlobalConfig.nPage<1 ){ |
| 20638 | 20633 | sqlite3GlobalConfig.pPage = 0; |
| 20639 | 20634 | sqlite3GlobalConfig.szPage = 0; |
| 20640 | 20635 | sqlite3GlobalConfig.nPage = 0; |
| 20641 | 20636 | } |
| 20642 | | - return sqlite3GlobalConfig.m.xInit(sqlite3GlobalConfig.m.pAppData); |
| 20637 | + rc = sqlite3GlobalConfig.m.xInit(sqlite3GlobalConfig.m.pAppData); |
| 20638 | + if( rc!=SQLITE_OK ) memset(&mem0, 0, sizeof(mem0)); |
| 20639 | + return rc; |
| 20643 | 20640 | } |
| 20644 | 20641 | |
| 20645 | 20642 | /* |
| 20646 | 20643 | ** Return true if the heap is currently under memory pressure - in other |
| 20647 | 20644 | ** words if the amount of heap used is close to the limit set by |
| | @@ -20662,11 +20659,11 @@ |
| 20662 | 20659 | } |
| 20663 | 20660 | |
| 20664 | 20661 | /* |
| 20665 | 20662 | ** Return the amount of memory currently checked out. |
| 20666 | 20663 | */ |
| 20667 | | -SQLITE_API sqlite3_int64 sqlite3_memory_used(void){ |
| 20664 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void){ |
| 20668 | 20665 | int n, mx; |
| 20669 | 20666 | sqlite3_int64 res; |
| 20670 | 20667 | sqlite3_status(SQLITE_STATUS_MEMORY_USED, &n, &mx, 0); |
| 20671 | 20668 | res = (sqlite3_int64)n; /* Work around bug in Borland C. Ticket #3216 */ |
| 20672 | 20669 | return res; |
| | @@ -20675,11 +20672,11 @@ |
| 20675 | 20672 | /* |
| 20676 | 20673 | ** Return the maximum amount of memory that has ever been |
| 20677 | 20674 | ** checked out since either the beginning of this process |
| 20678 | 20675 | ** or since the most recent reset. |
| 20679 | 20676 | */ |
| 20680 | | -SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag){ |
| 20677 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag){ |
| 20681 | 20678 | int n, mx; |
| 20682 | 20679 | sqlite3_int64 res; |
| 20683 | 20680 | sqlite3_status(SQLITE_STATUS_MEMORY_USED, &n, &mx, resetFlag); |
| 20684 | 20681 | res = (sqlite3_int64)mx; /* Work around bug in Borland C. Ticket #3216 */ |
| 20685 | 20682 | return res; |
| | @@ -20766,17 +20763,17 @@ |
| 20766 | 20763 | /* |
| 20767 | 20764 | ** This version of the memory allocation is for use by the application. |
| 20768 | 20765 | ** First make sure the memory subsystem is initialized, then do the |
| 20769 | 20766 | ** allocation. |
| 20770 | 20767 | */ |
| 20771 | | -SQLITE_API void *sqlite3_malloc(int n){ |
| 20768 | +SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int n){ |
| 20772 | 20769 | #ifndef SQLITE_OMIT_AUTOINIT |
| 20773 | 20770 | if( sqlite3_initialize() ) return 0; |
| 20774 | 20771 | #endif |
| 20775 | 20772 | return n<=0 ? 0 : sqlite3Malloc(n); |
| 20776 | 20773 | } |
| 20777 | | -SQLITE_API void *sqlite3_malloc64(sqlite3_uint64 n){ |
| 20774 | +SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64 n){ |
| 20778 | 20775 | #ifndef SQLITE_OMIT_AUTOINIT |
| 20779 | 20776 | if( sqlite3_initialize() ) return 0; |
| 20780 | 20777 | #endif |
| 20781 | 20778 | return sqlite3Malloc(n); |
| 20782 | 20779 | } |
| | @@ -20913,20 +20910,20 @@ |
| 20913 | 20910 | assert( sqlite3MemdebugNoType(p, (u8)~(MEMTYPE_LOOKASIDE|MEMTYPE_HEAP)) ); |
| 20914 | 20911 | return sqlite3GlobalConfig.m.xSize(p); |
| 20915 | 20912 | } |
| 20916 | 20913 | } |
| 20917 | 20914 | } |
| 20918 | | -SQLITE_API sqlite3_uint64 sqlite3_msize(void *p){ |
| 20915 | +SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void *p){ |
| 20919 | 20916 | assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) ); |
| 20920 | 20917 | assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) ); |
| 20921 | 20918 | return (sqlite3_uint64)sqlite3GlobalConfig.m.xSize(p); |
| 20922 | 20919 | } |
| 20923 | 20920 | |
| 20924 | 20921 | /* |
| 20925 | 20922 | ** Free memory previously obtained from sqlite3Malloc(). |
| 20926 | 20923 | */ |
| 20927 | | -SQLITE_API void sqlite3_free(void *p){ |
| 20924 | +SQLITE_API void SQLITE_STDCALL sqlite3_free(void *p){ |
| 20928 | 20925 | if( p==0 ) return; /* IMP: R-49053-54554 */ |
| 20929 | 20926 | assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) ); |
| 20930 | 20927 | assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) ); |
| 20931 | 20928 | if( sqlite3GlobalConfig.bMemstat ){ |
| 20932 | 20929 | sqlite3_mutex_enter(mem0.mutex); |
| | @@ -21031,18 +21028,18 @@ |
| 21031 | 21028 | |
| 21032 | 21029 | /* |
| 21033 | 21030 | ** The public interface to sqlite3Realloc. Make sure that the memory |
| 21034 | 21031 | ** subsystem is initialized prior to invoking sqliteRealloc. |
| 21035 | 21032 | */ |
| 21036 | | -SQLITE_API void *sqlite3_realloc(void *pOld, int n){ |
| 21033 | +SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void *pOld, int n){ |
| 21037 | 21034 | #ifndef SQLITE_OMIT_AUTOINIT |
| 21038 | 21035 | if( sqlite3_initialize() ) return 0; |
| 21039 | 21036 | #endif |
| 21040 | 21037 | if( n<0 ) n = 0; /* IMP: R-26507-47431 */ |
| 21041 | 21038 | return sqlite3Realloc(pOld, n); |
| 21042 | 21039 | } |
| 21043 | | -SQLITE_API void *sqlite3_realloc64(void *pOld, sqlite3_uint64 n){ |
| 21040 | +SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void *pOld, sqlite3_uint64 n){ |
| 21044 | 21041 | #ifndef SQLITE_OMIT_AUTOINIT |
| 21045 | 21042 | if( sqlite3_initialize() ) return 0; |
| 21046 | 21043 | #endif |
| 21047 | 21044 | return sqlite3Realloc(pOld, n); |
| 21048 | 21045 | } |
| | @@ -22204,11 +22201,11 @@ |
| 22204 | 22201 | |
| 22205 | 22202 | /* |
| 22206 | 22203 | ** Print into memory obtained from sqlite3_malloc(). Omit the internal |
| 22207 | 22204 | ** %-conversion extensions. |
| 22208 | 22205 | */ |
| 22209 | | -SQLITE_API char *sqlite3_vmprintf(const char *zFormat, va_list ap){ |
| 22206 | +SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char *zFormat, va_list ap){ |
| 22210 | 22207 | char *z; |
| 22211 | 22208 | char zBase[SQLITE_PRINT_BUF_SIZE]; |
| 22212 | 22209 | StrAccum acc; |
| 22213 | 22210 | |
| 22214 | 22211 | #ifdef SQLITE_ENABLE_API_ARMOR |
| | @@ -22229,11 +22226,11 @@ |
| 22229 | 22226 | |
| 22230 | 22227 | /* |
| 22231 | 22228 | ** Print into memory obtained from sqlite3_malloc()(). Omit the internal |
| 22232 | 22229 | ** %-conversion extensions. |
| 22233 | 22230 | */ |
| 22234 | | -SQLITE_API char *sqlite3_mprintf(const char *zFormat, ...){ |
| 22231 | +SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char *zFormat, ...){ |
| 22235 | 22232 | va_list ap; |
| 22236 | 22233 | char *z; |
| 22237 | 22234 | #ifndef SQLITE_OMIT_AUTOINIT |
| 22238 | 22235 | if( sqlite3_initialize() ) return 0; |
| 22239 | 22236 | #endif |
| | @@ -22254,11 +22251,11 @@ |
| 22254 | 22251 | ** this without breaking compatibility, so we just have to live with the |
| 22255 | 22252 | ** mistake. |
| 22256 | 22253 | ** |
| 22257 | 22254 | ** sqlite3_vsnprintf() is the varargs version. |
| 22258 | 22255 | */ |
| 22259 | | -SQLITE_API char *sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){ |
| 22256 | +SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){ |
| 22260 | 22257 | StrAccum acc; |
| 22261 | 22258 | if( n<=0 ) return zBuf; |
| 22262 | 22259 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 22263 | 22260 | if( zBuf==0 || zFormat==0 ) { |
| 22264 | 22261 | (void)SQLITE_MISUSE_BKPT; |
| | @@ -22269,11 +22266,11 @@ |
| 22269 | 22266 | sqlite3StrAccumInit(&acc, zBuf, n, 0); |
| 22270 | 22267 | acc.useMalloc = 0; |
| 22271 | 22268 | sqlite3VXPrintf(&acc, 0, zFormat, ap); |
| 22272 | 22269 | return sqlite3StrAccumFinish(&acc); |
| 22273 | 22270 | } |
| 22274 | | -SQLITE_API char *sqlite3_snprintf(int n, char *zBuf, const char *zFormat, ...){ |
| 22271 | +SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int n, char *zBuf, const char *zFormat, ...){ |
| 22275 | 22272 | char *z; |
| 22276 | 22273 | va_list ap; |
| 22277 | 22274 | va_start(ap,zFormat); |
| 22278 | 22275 | z = sqlite3_vsnprintf(n, zBuf, zFormat, ap); |
| 22279 | 22276 | va_end(ap); |
| | @@ -22301,11 +22298,11 @@ |
| 22301 | 22298 | } |
| 22302 | 22299 | |
| 22303 | 22300 | /* |
| 22304 | 22301 | ** Format and write a message to the log if logging is enabled. |
| 22305 | 22302 | */ |
| 22306 | | -SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...){ |
| 22303 | +SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...){ |
| 22307 | 22304 | va_list ap; /* Vararg list */ |
| 22308 | 22305 | if( sqlite3GlobalConfig.xLog ){ |
| 22309 | 22306 | va_start(ap, zFormat); |
| 22310 | 22307 | renderLogMsg(iErrCode, zFormat, ap); |
| 22311 | 22308 | va_end(ap); |
| | @@ -22437,11 +22434,11 @@ |
| 22437 | 22434 | } sqlite3Prng; |
| 22438 | 22435 | |
| 22439 | 22436 | /* |
| 22440 | 22437 | ** Return N random bytes. |
| 22441 | 22438 | */ |
| 22442 | | -SQLITE_API void sqlite3_randomness(int N, void *pBuf){ |
| 22439 | +SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *pBuf){ |
| 22443 | 22440 | unsigned char t; |
| 22444 | 22441 | unsigned char *zBuf = pBuf; |
| 22445 | 22442 | |
| 22446 | 22443 | /* The "wsdPrng" macro will resolve to the pseudo-random number generator |
| 22447 | 22444 | ** state vector. If writable static data is unsupported on the target, |
| | @@ -23589,11 +23586,11 @@ |
| 23589 | 23586 | ** sqlite3_strnicmp() APIs allow applications and extensions to compare |
| 23590 | 23587 | ** the contents of two buffers containing UTF-8 strings in a |
| 23591 | 23588 | ** case-independent fashion, using the same definition of "case |
| 23592 | 23589 | ** independence" that SQLite uses internally when comparing identifiers. |
| 23593 | 23590 | */ |
| 23594 | | -SQLITE_API int sqlite3_stricmp(const char *zLeft, const char *zRight){ |
| 23591 | +SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *zLeft, const char *zRight){ |
| 23595 | 23592 | register unsigned char *a, *b; |
| 23596 | 23593 | if( zLeft==0 ){ |
| 23597 | 23594 | return zRight ? -1 : 0; |
| 23598 | 23595 | }else if( zRight==0 ){ |
| 23599 | 23596 | return 1; |
| | @@ -23601,11 +23598,11 @@ |
| 23601 | 23598 | a = (unsigned char *)zLeft; |
| 23602 | 23599 | b = (unsigned char *)zRight; |
| 23603 | 23600 | while( *a!=0 && UpperToLower[*a]==UpperToLower[*b]){ a++; b++; } |
| 23604 | 23601 | return UpperToLower[*a] - UpperToLower[*b]; |
| 23605 | 23602 | } |
| 23606 | | -SQLITE_API int sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){ |
| 23603 | +SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){ |
| 23607 | 23604 | register unsigned char *a, *b; |
| 23608 | 23605 | if( zLeft==0 ){ |
| 23609 | 23606 | return zRight ? -1 : 0; |
| 23610 | 23607 | }else if( zRight==0 ){ |
| 23611 | 23608 | return 1; |
| | @@ -32814,11 +32811,11 @@ |
| 32814 | 32811 | ** This routine is called once during SQLite initialization and by a |
| 32815 | 32812 | ** single thread. The memory allocation and mutex subsystems have not |
| 32816 | 32813 | ** necessarily been initialized when this routine is called, and so they |
| 32817 | 32814 | ** should not be used. |
| 32818 | 32815 | */ |
| 32819 | | -SQLITE_API int sqlite3_os_init(void){ |
| 32816 | +SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){ |
| 32820 | 32817 | /* |
| 32821 | 32818 | ** The following macro defines an initializer for an sqlite3_vfs object. |
| 32822 | 32819 | ** The name of the VFS is NAME. The pAppData is a pointer to a pointer |
| 32823 | 32820 | ** to the "finder" function. (pAppData is a pointer to a pointer because |
| 32824 | 32821 | ** silly C90 rules prohibit a void* from being cast to a function pointer |
| | @@ -32913,11 +32910,11 @@ |
| 32913 | 32910 | ** |
| 32914 | 32911 | ** Some operating systems might need to do some cleanup in this routine, |
| 32915 | 32912 | ** to release dynamically allocated objects. But not on unix. |
| 32916 | 32913 | ** This routine is a no-op for unix. |
| 32917 | 32914 | */ |
| 32918 | | -SQLITE_API int sqlite3_os_end(void){ |
| 32915 | +SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){ |
| 32919 | 32916 | return SQLITE_OK; |
| 32920 | 32917 | } |
| 32921 | 32918 | |
| 32922 | 32919 | #endif /* SQLITE_OS_UNIX */ |
| 32923 | 32920 | |
| | @@ -34305,11 +34302,11 @@ |
| 34305 | 34302 | ** compact it. Upon success, SQLITE_OK will be returned. Upon failure, one |
| 34306 | 34303 | ** of SQLITE_NOMEM, SQLITE_ERROR, or SQLITE_NOTFOUND will be returned. The |
| 34307 | 34304 | ** "pnLargest" argument, if non-zero, will be used to return the size of the |
| 34308 | 34305 | ** largest committed free block in the heap, in bytes. |
| 34309 | 34306 | */ |
| 34310 | | -SQLITE_API int sqlite3_win32_compact_heap(LPUINT pnLargest){ |
| 34307 | +SQLITE_API int SQLITE_STDCALL sqlite3_win32_compact_heap(LPUINT pnLargest){ |
| 34311 | 34308 | int rc = SQLITE_OK; |
| 34312 | 34309 | UINT nLargest = 0; |
| 34313 | 34310 | HANDLE hHeap; |
| 34314 | 34311 | |
| 34315 | 34312 | winMemAssertMagic(); |
| | @@ -34345,11 +34342,11 @@ |
| 34345 | 34342 | ** If a Win32 native heap has been configured, this function will attempt to |
| 34346 | 34343 | ** destroy and recreate it. If the Win32 native heap is not isolated and/or |
| 34347 | 34344 | ** the sqlite3_memory_used() function does not return zero, SQLITE_BUSY will |
| 34348 | 34345 | ** be returned and no changes will be made to the Win32 native heap. |
| 34349 | 34346 | */ |
| 34350 | | -SQLITE_API int sqlite3_win32_reset_heap(){ |
| 34347 | +SQLITE_API int SQLITE_STDCALL sqlite3_win32_reset_heap(){ |
| 34351 | 34348 | int rc; |
| 34352 | 34349 | MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */ |
| 34353 | 34350 | MUTEX_LOGIC( sqlite3_mutex *pMem; ) /* The memsys static mutex */ |
| 34354 | 34351 | MUTEX_LOGIC( pMaster = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MASTER); ) |
| 34355 | 34352 | MUTEX_LOGIC( pMem = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MEM); ) |
| | @@ -34390,11 +34387,11 @@ |
| 34390 | 34387 | /* |
| 34391 | 34388 | ** This function outputs the specified (ANSI) string to the Win32 debugger |
| 34392 | 34389 | ** (if available). |
| 34393 | 34390 | */ |
| 34394 | 34391 | |
| 34395 | | -SQLITE_API void sqlite3_win32_write_debug(const char *zBuf, int nBuf){ |
| 34392 | +SQLITE_API void SQLITE_STDCALL sqlite3_win32_write_debug(const char *zBuf, int nBuf){ |
| 34396 | 34393 | char zDbgBuf[SQLITE_WIN32_DBG_BUF_SIZE]; |
| 34397 | 34394 | int nMin = MIN(nBuf, (SQLITE_WIN32_DBG_BUF_SIZE - 1)); /* may be negative. */ |
| 34398 | 34395 | if( nMin<-1 ) nMin = -1; /* all negative values become -1. */ |
| 34399 | 34396 | assert( nMin==-1 || nMin==0 || nMin<SQLITE_WIN32_DBG_BUF_SIZE ); |
| 34400 | 34397 | #if defined(SQLITE_WIN32_HAS_ANSI) |
| | @@ -34430,11 +34427,11 @@ |
| 34430 | 34427 | */ |
| 34431 | 34428 | #if SQLITE_OS_WINRT |
| 34432 | 34429 | static HANDLE sleepObj = NULL; |
| 34433 | 34430 | #endif |
| 34434 | 34431 | |
| 34435 | | -SQLITE_API void sqlite3_win32_sleep(DWORD milliseconds){ |
| 34432 | +SQLITE_API void SQLITE_STDCALL sqlite3_win32_sleep(DWORD milliseconds){ |
| 34436 | 34433 | #if SQLITE_OS_WINRT |
| 34437 | 34434 | if ( sleepObj==NULL ){ |
| 34438 | 34435 | sleepObj = osCreateEventExW(NULL, NULL, CREATE_EVENT_MANUAL_RESET, |
| 34439 | 34436 | SYNCHRONIZE); |
| 34440 | 34437 | } |
| | @@ -34479,11 +34476,11 @@ |
| 34479 | 34476 | |
| 34480 | 34477 | /* |
| 34481 | 34478 | ** This function determines if the machine is running a version of Windows |
| 34482 | 34479 | ** based on the NT kernel. |
| 34483 | 34480 | */ |
| 34484 | | -SQLITE_API int sqlite3_win32_is_nt(void){ |
| 34481 | +SQLITE_API int SQLITE_STDCALL sqlite3_win32_is_nt(void){ |
| 34485 | 34482 | #if SQLITE_OS_WINRT |
| 34486 | 34483 | /* |
| 34487 | 34484 | ** NOTE: The WinRT sub-platform is always assumed to be based on the NT |
| 34488 | 34485 | ** kernel. |
| 34489 | 34486 | */ |
| | @@ -34833,11 +34830,11 @@ |
| 34833 | 34830 | |
| 34834 | 34831 | /* |
| 34835 | 34832 | ** Convert multibyte character string to UTF-8. Space to hold the |
| 34836 | 34833 | ** returned string is obtained from sqlite3_malloc(). |
| 34837 | 34834 | */ |
| 34838 | | -SQLITE_API char *sqlite3_win32_mbcs_to_utf8(const char *zFilename){ |
| 34835 | +SQLITE_API char *SQLITE_STDCALL sqlite3_win32_mbcs_to_utf8(const char *zFilename){ |
| 34839 | 34836 | char *zFilenameUtf8; |
| 34840 | 34837 | LPWSTR zTmpWide; |
| 34841 | 34838 | |
| 34842 | 34839 | zTmpWide = winMbcsToUnicode(zFilename); |
| 34843 | 34840 | if( zTmpWide==0 ){ |
| | @@ -34850,11 +34847,11 @@ |
| 34850 | 34847 | |
| 34851 | 34848 | /* |
| 34852 | 34849 | ** Convert UTF-8 to multibyte character string. Space to hold the |
| 34853 | 34850 | ** returned string is obtained from sqlite3_malloc(). |
| 34854 | 34851 | */ |
| 34855 | | -SQLITE_API char *sqlite3_win32_utf8_to_mbcs(const char *zFilename){ |
| 34852 | +SQLITE_API char *SQLITE_STDCALL sqlite3_win32_utf8_to_mbcs(const char *zFilename){ |
| 34856 | 34853 | char *zFilenameMbcs; |
| 34857 | 34854 | LPWSTR zTmpWide; |
| 34858 | 34855 | |
| 34859 | 34856 | zTmpWide = winUtf8ToUnicode(zFilename); |
| 34860 | 34857 | if( zTmpWide==0 ){ |
| | @@ -34870,11 +34867,11 @@ |
| 34870 | 34867 | ** the provided arguments. The type argument must be 1 in order to set the |
| 34871 | 34868 | ** data directory or 2 in order to set the temporary directory. The zValue |
| 34872 | 34869 | ** argument is the name of the directory to use. The return value will be |
| 34873 | 34870 | ** SQLITE_OK if successful. |
| 34874 | 34871 | */ |
| 34875 | | -SQLITE_API int sqlite3_win32_set_directory(DWORD type, LPCWSTR zValue){ |
| 34872 | +SQLITE_API int SQLITE_STDCALL sqlite3_win32_set_directory(DWORD type, LPCWSTR zValue){ |
| 34876 | 34873 | char **ppDirectory = 0; |
| 34877 | 34874 | #ifndef SQLITE_OMIT_AUTOINIT |
| 34878 | 34875 | int rc = sqlite3_initialize(); |
| 34879 | 34876 | if( rc ) return rc; |
| 34880 | 34877 | #endif |
| | @@ -35095,15 +35092,15 @@ |
| 35095 | 35092 | } |
| 35096 | 35093 | |
| 35097 | 35094 | /* |
| 35098 | 35095 | ** Log a I/O error retry episode. |
| 35099 | 35096 | */ |
| 35100 | | -static void winLogIoerr(int nRetry){ |
| 35097 | +static void winLogIoerr(int nRetry, int lineno){ |
| 35101 | 35098 | if( nRetry ){ |
| 35102 | 35099 | sqlite3_log(SQLITE_IOERR, |
| 35103 | | - "delayed %dms for lock/sharing conflict", |
| 35104 | | - winIoerrRetryDelay*nRetry*(nRetry+1)/2 |
| 35100 | + "delayed %dms for lock/sharing conflict at line %d", |
| 35101 | + winIoerrRetryDelay*nRetry*(nRetry+1)/2, lineno |
| 35105 | 35102 | ); |
| 35106 | 35103 | } |
| 35107 | 35104 | } |
| 35108 | 35105 | |
| 35109 | 35106 | #if SQLITE_OS_WINCE |
| | @@ -35579,11 +35576,12 @@ |
| 35579 | 35576 | assert( id!=0 ); |
| 35580 | 35577 | #ifndef SQLITE_OMIT_WAL |
| 35581 | 35578 | assert( pFile->pShm==0 ); |
| 35582 | 35579 | #endif |
| 35583 | 35580 | assert( pFile->h!=NULL && pFile->h!=INVALID_HANDLE_VALUE ); |
| 35584 | | - OSTRACE(("CLOSE file=%p\n", pFile->h)); |
| 35581 | + OSTRACE(("CLOSE pid=%lu, pFile=%p, file=%p\n", |
| 35582 | + osGetCurrentProcessId(), pFile, pFile->h)); |
| 35585 | 35583 | |
| 35586 | 35584 | #if SQLITE_MAX_MMAP_SIZE>0 |
| 35587 | 35585 | winUnmapfile(pFile); |
| 35588 | 35586 | #endif |
| 35589 | 35587 | |
| | @@ -35608,11 +35606,12 @@ |
| 35608 | 35606 | #endif |
| 35609 | 35607 | if( rc ){ |
| 35610 | 35608 | pFile->h = NULL; |
| 35611 | 35609 | } |
| 35612 | 35610 | OpenCounter(-1); |
| 35613 | | - OSTRACE(("CLOSE file=%p, rc=%s\n", pFile->h, rc ? "ok" : "failed")); |
| 35611 | + OSTRACE(("CLOSE pid=%lu, pFile=%p, file=%p, rc=%s\n", |
| 35612 | + osGetCurrentProcessId(), pFile, pFile->h, rc ? "ok" : "failed")); |
| 35614 | 35613 | return rc ? SQLITE_OK |
| 35615 | 35614 | : winLogError(SQLITE_IOERR_CLOSE, osGetLastError(), |
| 35616 | 35615 | "winClose", pFile->zPath); |
| 35617 | 35616 | } |
| 35618 | 35617 | |
| | @@ -35636,20 +35635,22 @@ |
| 35636 | 35635 | |
| 35637 | 35636 | assert( id!=0 ); |
| 35638 | 35637 | assert( amt>0 ); |
| 35639 | 35638 | assert( offset>=0 ); |
| 35640 | 35639 | SimulateIOError(return SQLITE_IOERR_READ); |
| 35641 | | - OSTRACE(("READ file=%p, buffer=%p, amount=%d, offset=%lld, lock=%d\n", |
| 35640 | + OSTRACE(("READ pid=%lu, pFile=%p, file=%p, buffer=%p, amount=%d, " |
| 35641 | + "offset=%lld, lock=%d\n", osGetCurrentProcessId(), pFile, |
| 35642 | 35642 | pFile->h, pBuf, amt, offset, pFile->locktype)); |
| 35643 | 35643 | |
| 35644 | 35644 | #if SQLITE_MAX_MMAP_SIZE>0 |
| 35645 | 35645 | /* Deal with as much of this read request as possible by transfering |
| 35646 | 35646 | ** data from the memory mapping using memcpy(). */ |
| 35647 | 35647 | if( offset<pFile->mmapSize ){ |
| 35648 | 35648 | if( offset+amt <= pFile->mmapSize ){ |
| 35649 | 35649 | memcpy(pBuf, &((u8 *)(pFile->pMapRegion))[offset], amt); |
| 35650 | | - OSTRACE(("READ-MMAP file=%p, rc=SQLITE_OK\n", pFile->h)); |
| 35650 | + OSTRACE(("READ-MMAP pid=%lu, pFile=%p, file=%p, rc=SQLITE_OK\n", |
| 35651 | + osGetCurrentProcessId(), pFile, pFile->h)); |
| 35651 | 35652 | return SQLITE_OK; |
| 35652 | 35653 | }else{ |
| 35653 | 35654 | int nCopy = (int)(pFile->mmapSize - offset); |
| 35654 | 35655 | memcpy(pBuf, &((u8 *)(pFile->pMapRegion))[offset], nCopy); |
| 35655 | 35656 | pBuf = &((u8 *)pBuf)[nCopy]; |
| | @@ -35659,11 +35660,12 @@ |
| 35659 | 35660 | } |
| 35660 | 35661 | #endif |
| 35661 | 35662 | |
| 35662 | 35663 | #if SQLITE_OS_WINCE || defined(SQLITE_WIN32_NO_OVERLAPPED) |
| 35663 | 35664 | if( winSeekFile(pFile, offset) ){ |
| 35664 | | - OSTRACE(("READ file=%p, rc=SQLITE_FULL\n", pFile->h)); |
| 35665 | + OSTRACE(("READ pid=%lu, pFile=%p, file=%p, rc=SQLITE_FULL\n", |
| 35666 | + osGetCurrentProcessId(), pFile, pFile->h)); |
| 35665 | 35667 | return SQLITE_FULL; |
| 35666 | 35668 | } |
| 35667 | 35669 | while( !osReadFile(pFile->h, pBuf, amt, &nRead, 0) ){ |
| 35668 | 35670 | #else |
| 35669 | 35671 | memset(&overlapped, 0, sizeof(OVERLAPPED)); |
| | @@ -35673,23 +35675,26 @@ |
| 35673 | 35675 | osGetLastError()!=ERROR_HANDLE_EOF ){ |
| 35674 | 35676 | #endif |
| 35675 | 35677 | DWORD lastErrno; |
| 35676 | 35678 | if( winRetryIoerr(&nRetry, &lastErrno) ) continue; |
| 35677 | 35679 | pFile->lastErrno = lastErrno; |
| 35678 | | - OSTRACE(("READ file=%p, rc=SQLITE_IOERR_READ\n", pFile->h)); |
| 35680 | + OSTRACE(("READ pid=%lu, pFile=%p, file=%p, rc=SQLITE_IOERR_READ\n", |
| 35681 | + osGetCurrentProcessId(), pFile, pFile->h)); |
| 35679 | 35682 | return winLogError(SQLITE_IOERR_READ, pFile->lastErrno, |
| 35680 | 35683 | "winRead", pFile->zPath); |
| 35681 | 35684 | } |
| 35682 | | - winLogIoerr(nRetry); |
| 35685 | + winLogIoerr(nRetry, __LINE__); |
| 35683 | 35686 | if( nRead<(DWORD)amt ){ |
| 35684 | 35687 | /* Unread parts of the buffer must be zero-filled */ |
| 35685 | 35688 | memset(&((char*)pBuf)[nRead], 0, amt-nRead); |
| 35686 | | - OSTRACE(("READ file=%p, rc=SQLITE_IOERR_SHORT_READ\n", pFile->h)); |
| 35689 | + OSTRACE(("READ pid=%lu, pFile=%p, file=%p, rc=SQLITE_IOERR_SHORT_READ\n", |
| 35690 | + osGetCurrentProcessId(), pFile, pFile->h)); |
| 35687 | 35691 | return SQLITE_IOERR_SHORT_READ; |
| 35688 | 35692 | } |
| 35689 | 35693 | |
| 35690 | | - OSTRACE(("READ file=%p, rc=SQLITE_OK\n", pFile->h)); |
| 35694 | + OSTRACE(("READ pid=%lu, pFile=%p, file=%p, rc=SQLITE_OK\n", |
| 35695 | + osGetCurrentProcessId(), pFile, pFile->h)); |
| 35691 | 35696 | return SQLITE_OK; |
| 35692 | 35697 | } |
| 35693 | 35698 | |
| 35694 | 35699 | /* |
| 35695 | 35700 | ** Write data from a buffer into a file. Return SQLITE_OK on success |
| | @@ -35708,20 +35713,22 @@ |
| 35708 | 35713 | assert( amt>0 ); |
| 35709 | 35714 | assert( pFile ); |
| 35710 | 35715 | SimulateIOError(return SQLITE_IOERR_WRITE); |
| 35711 | 35716 | SimulateDiskfullError(return SQLITE_FULL); |
| 35712 | 35717 | |
| 35713 | | - OSTRACE(("WRITE file=%p, buffer=%p, amount=%d, offset=%lld, lock=%d\n", |
| 35718 | + OSTRACE(("WRITE pid=%lu, pFile=%p, file=%p, buffer=%p, amount=%d, " |
| 35719 | + "offset=%lld, lock=%d\n", osGetCurrentProcessId(), pFile, |
| 35714 | 35720 | pFile->h, pBuf, amt, offset, pFile->locktype)); |
| 35715 | 35721 | |
| 35716 | 35722 | #if SQLITE_MAX_MMAP_SIZE>0 |
| 35717 | 35723 | /* Deal with as much of this write request as possible by transfering |
| 35718 | 35724 | ** data from the memory mapping using memcpy(). */ |
| 35719 | 35725 | if( offset<pFile->mmapSize ){ |
| 35720 | 35726 | if( offset+amt <= pFile->mmapSize ){ |
| 35721 | 35727 | memcpy(&((u8 *)(pFile->pMapRegion))[offset], pBuf, amt); |
| 35722 | | - OSTRACE(("WRITE-MMAP file=%p, rc=SQLITE_OK\n", pFile->h)); |
| 35728 | + OSTRACE(("WRITE-MMAP pid=%lu, pFile=%p, file=%p, rc=SQLITE_OK\n", |
| 35729 | + osGetCurrentProcessId(), pFile, pFile->h)); |
| 35723 | 35730 | return SQLITE_OK; |
| 35724 | 35731 | }else{ |
| 35725 | 35732 | int nCopy = (int)(pFile->mmapSize - offset); |
| 35726 | 35733 | memcpy(&((u8 *)(pFile->pMapRegion))[offset], pBuf, nCopy); |
| 35727 | 35734 | pBuf = &((u8 *)pBuf)[nCopy]; |
| | @@ -35780,21 +35787,24 @@ |
| 35780 | 35787 | } |
| 35781 | 35788 | |
| 35782 | 35789 | if( rc ){ |
| 35783 | 35790 | if( ( pFile->lastErrno==ERROR_HANDLE_DISK_FULL ) |
| 35784 | 35791 | || ( pFile->lastErrno==ERROR_DISK_FULL )){ |
| 35785 | | - OSTRACE(("WRITE file=%p, rc=SQLITE_FULL\n", pFile->h)); |
| 35792 | + OSTRACE(("WRITE pid=%lu, pFile=%p, file=%p, rc=SQLITE_FULL\n", |
| 35793 | + osGetCurrentProcessId(), pFile, pFile->h)); |
| 35786 | 35794 | return winLogError(SQLITE_FULL, pFile->lastErrno, |
| 35787 | 35795 | "winWrite1", pFile->zPath); |
| 35788 | 35796 | } |
| 35789 | | - OSTRACE(("WRITE file=%p, rc=SQLITE_IOERR_WRITE\n", pFile->h)); |
| 35797 | + OSTRACE(("WRITE pid=%lu, pFile=%p, file=%p, rc=SQLITE_IOERR_WRITE\n", |
| 35798 | + osGetCurrentProcessId(), pFile, pFile->h)); |
| 35790 | 35799 | return winLogError(SQLITE_IOERR_WRITE, pFile->lastErrno, |
| 35791 | 35800 | "winWrite2", pFile->zPath); |
| 35792 | 35801 | }else{ |
| 35793 | | - winLogIoerr(nRetry); |
| 35802 | + winLogIoerr(nRetry, __LINE__); |
| 35794 | 35803 | } |
| 35795 | | - OSTRACE(("WRITE file=%p, rc=SQLITE_OK\n", pFile->h)); |
| 35804 | + OSTRACE(("WRITE pid=%lu, pFile=%p, file=%p, rc=SQLITE_OK\n", |
| 35805 | + osGetCurrentProcessId(), pFile, pFile->h)); |
| 35796 | 35806 | return SQLITE_OK; |
| 35797 | 35807 | } |
| 35798 | 35808 | |
| 35799 | 35809 | /* |
| 35800 | 35810 | ** Truncate an open file to a specified size |
| | @@ -35804,12 +35814,12 @@ |
| 35804 | 35814 | int rc = SQLITE_OK; /* Return code for this function */ |
| 35805 | 35815 | DWORD lastErrno; |
| 35806 | 35816 | |
| 35807 | 35817 | assert( pFile ); |
| 35808 | 35818 | SimulateIOError(return SQLITE_IOERR_TRUNCATE); |
| 35809 | | - OSTRACE(("TRUNCATE file=%p, size=%lld, lock=%d\n", |
| 35810 | | - pFile->h, nByte, pFile->locktype)); |
| 35819 | + OSTRACE(("TRUNCATE pid=%lu, pFile=%p, file=%p, size=%lld, lock=%d\n", |
| 35820 | + osGetCurrentProcessId(), pFile, pFile->h, nByte, pFile->locktype)); |
| 35811 | 35821 | |
| 35812 | 35822 | /* If the user has configured a chunk-size for this file, truncate the |
| 35813 | 35823 | ** file so that it consists of an integer number of chunks (i.e. the |
| 35814 | 35824 | ** actual file size after the operation may be larger than the requested |
| 35815 | 35825 | ** size). |
| | @@ -35837,11 +35847,12 @@ |
| 35837 | 35847 | if( pFile->pMapRegion && nByte<pFile->mmapSize ){ |
| 35838 | 35848 | pFile->mmapSize = nByte; |
| 35839 | 35849 | } |
| 35840 | 35850 | #endif |
| 35841 | 35851 | |
| 35842 | | - OSTRACE(("TRUNCATE file=%p, rc=%s\n", pFile->h, sqlite3ErrName(rc))); |
| 35852 | + OSTRACE(("TRUNCATE pid=%lu, pFile=%p, file=%p, rc=%s\n", |
| 35853 | + osGetCurrentProcessId(), pFile, pFile->h, sqlite3ErrName(rc))); |
| 35843 | 35854 | return rc; |
| 35844 | 35855 | } |
| 35845 | 35856 | |
| 35846 | 35857 | #ifdef SQLITE_TEST |
| 35847 | 35858 | /* |
| | @@ -35882,12 +35893,13 @@ |
| 35882 | 35893 | /* Unix cannot, but some systems may return SQLITE_FULL from here. This |
| 35883 | 35894 | ** line is to test that doing so does not cause any problems. |
| 35884 | 35895 | */ |
| 35885 | 35896 | SimulateDiskfullError( return SQLITE_FULL ); |
| 35886 | 35897 | |
| 35887 | | - OSTRACE(("SYNC file=%p, flags=%x, lock=%d\n", |
| 35888 | | - pFile->h, flags, pFile->locktype)); |
| 35898 | + OSTRACE(("SYNC pid=%lu, pFile=%p, file=%p, flags=%x, lock=%d\n", |
| 35899 | + osGetCurrentProcessId(), pFile, pFile->h, flags, |
| 35900 | + pFile->locktype)); |
| 35889 | 35901 | |
| 35890 | 35902 | #ifndef SQLITE_TEST |
| 35891 | 35903 | UNUSED_PARAMETER(flags); |
| 35892 | 35904 | #else |
| 35893 | 35905 | if( (flags&0x0F)==SQLITE_SYNC_FULL ){ |
| | @@ -35898,21 +35910,24 @@ |
| 35898 | 35910 | |
| 35899 | 35911 | /* If we compiled with the SQLITE_NO_SYNC flag, then syncing is a |
| 35900 | 35912 | ** no-op |
| 35901 | 35913 | */ |
| 35902 | 35914 | #ifdef SQLITE_NO_SYNC |
| 35903 | | - OSTRACE(("SYNC-NOP file=%p, rc=SQLITE_OK\n", pFile->h)); |
| 35915 | + OSTRACE(("SYNC-NOP pid=%lu, pFile=%p, file=%p, rc=SQLITE_OK\n", |
| 35916 | + osGetCurrentProcessId(), pFile, pFile->h)); |
| 35904 | 35917 | return SQLITE_OK; |
| 35905 | 35918 | #else |
| 35906 | 35919 | rc = osFlushFileBuffers(pFile->h); |
| 35907 | 35920 | SimulateIOError( rc=FALSE ); |
| 35908 | 35921 | if( rc ){ |
| 35909 | | - OSTRACE(("SYNC file=%p, rc=SQLITE_OK\n", pFile->h)); |
| 35922 | + OSTRACE(("SYNC pid=%lu, pFile=%p, file=%p, rc=SQLITE_OK\n", |
| 35923 | + osGetCurrentProcessId(), pFile, pFile->h)); |
| 35910 | 35924 | return SQLITE_OK; |
| 35911 | 35925 | }else{ |
| 35912 | 35926 | pFile->lastErrno = osGetLastError(); |
| 35913 | | - OSTRACE(("SYNC file=%p, rc=SQLITE_IOERR_FSYNC\n", pFile->h)); |
| 35927 | + OSTRACE(("SYNC pid=%lu, pFile=%p, file=%p, rc=SQLITE_IOERR_FSYNC\n", |
| 35928 | + osGetCurrentProcessId(), pFile, pFile->h)); |
| 35914 | 35929 | return winLogError(SQLITE_IOERR_FSYNC, pFile->lastErrno, |
| 35915 | 35930 | "winSync", pFile->zPath); |
| 35916 | 35931 | } |
| 35917 | 35932 | #endif |
| 35918 | 35933 | } |
| | @@ -37881,11 +37896,11 @@ |
| 37881 | 37896 | winRetryIoerr(&cnt, &lastErrno) ){ |
| 37882 | 37897 | /* Noop */ |
| 37883 | 37898 | } |
| 37884 | 37899 | } |
| 37885 | 37900 | #endif |
| 37886 | | - winLogIoerr(cnt); |
| 37901 | + winLogIoerr(cnt, __LINE__); |
| 37887 | 37902 | |
| 37888 | 37903 | OSTRACE(("OPEN file=%p, name=%s, access=%lx, rc=%s\n", h, zUtf8Name, |
| 37889 | 37904 | dwDesiredAccess, (h==INVALID_HANDLE_VALUE) ? "failed" : "ok")); |
| 37890 | 37905 | |
| 37891 | 37906 | if( h==INVALID_HANDLE_VALUE ){ |
| | @@ -38065,11 +38080,11 @@ |
| 38065 | 38080 | } |
| 38066 | 38081 | #endif |
| 38067 | 38082 | if( rc && rc!=SQLITE_IOERR_DELETE_NOENT ){ |
| 38068 | 38083 | rc = winLogError(SQLITE_IOERR_DELETE, lastErrno, "winDelete", zFilename); |
| 38069 | 38084 | }else{ |
| 38070 | | - winLogIoerr(cnt); |
| 38085 | + winLogIoerr(cnt, __LINE__); |
| 38071 | 38086 | } |
| 38072 | 38087 | sqlite3_free(zConverted); |
| 38073 | 38088 | OSTRACE(("DELETE name=%s, rc=%s\n", zFilename, sqlite3ErrName(rc))); |
| 38074 | 38089 | return rc; |
| 38075 | 38090 | } |
| | @@ -38115,11 +38130,11 @@ |
| 38115 | 38130 | attr = INVALID_FILE_ATTRIBUTES; |
| 38116 | 38131 | }else{ |
| 38117 | 38132 | attr = sAttrData.dwFileAttributes; |
| 38118 | 38133 | } |
| 38119 | 38134 | }else{ |
| 38120 | | - winLogIoerr(cnt); |
| 38135 | + winLogIoerr(cnt, __LINE__); |
| 38121 | 38136 | if( lastErrno!=ERROR_FILE_NOT_FOUND && lastErrno!=ERROR_PATH_NOT_FOUND ){ |
| 38122 | 38137 | sqlite3_free(zConverted); |
| 38123 | 38138 | return winLogError(SQLITE_IOERR_ACCESS, lastErrno, "winAccess", |
| 38124 | 38139 | zFilename); |
| 38125 | 38140 | }else{ |
| | @@ -38630,11 +38645,11 @@ |
| 38630 | 38645 | } |
| 38631 | 38646 | |
| 38632 | 38647 | /* |
| 38633 | 38648 | ** Initialize and deinitialize the operating system interface. |
| 38634 | 38649 | */ |
| 38635 | | -SQLITE_API int sqlite3_os_init(void){ |
| 38650 | +SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){ |
| 38636 | 38651 | static sqlite3_vfs winVfs = { |
| 38637 | 38652 | 3, /* iVersion */ |
| 38638 | 38653 | sizeof(winFile), /* szOsFile */ |
| 38639 | 38654 | SQLITE_WIN32_MAX_PATH_BYTES, /* mxPathname */ |
| 38640 | 38655 | 0, /* pNext */ |
| | @@ -38705,11 +38720,11 @@ |
| 38705 | 38720 | #endif |
| 38706 | 38721 | |
| 38707 | 38722 | return SQLITE_OK; |
| 38708 | 38723 | } |
| 38709 | 38724 | |
| 38710 | | -SQLITE_API int sqlite3_os_end(void){ |
| 38725 | +SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){ |
| 38711 | 38726 | #if SQLITE_OS_WINRT |
| 38712 | 38727 | if( sleepObj!=NULL ){ |
| 38713 | 38728 | osCloseHandle(sleepObj); |
| 38714 | 38729 | sleepObj = NULL; |
| 38715 | 38730 | } |
| | @@ -53006,11 +53021,11 @@ |
| 53006 | 53021 | ** |
| 53007 | 53022 | ** This routine has no effect on existing database connections. |
| 53008 | 53023 | ** The shared cache setting effects only future calls to |
| 53009 | 53024 | ** sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2(). |
| 53010 | 53025 | */ |
| 53011 | | -SQLITE_API int sqlite3_enable_shared_cache(int enable){ |
| 53026 | +SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int enable){ |
| 53012 | 53027 | sqlite3GlobalConfig.sharedCacheEnabled = enable; |
| 53013 | 53028 | return SQLITE_OK; |
| 53014 | 53029 | } |
| 53015 | 53030 | #endif |
| 53016 | 53031 | |
| | @@ -53520,14 +53535,19 @@ |
| 53520 | 53535 | ** prior to calling this routine. |
| 53521 | 53536 | */ |
| 53522 | 53537 | static int saveCursorPosition(BtCursor *pCur){ |
| 53523 | 53538 | int rc; |
| 53524 | 53539 | |
| 53525 | | - assert( CURSOR_VALID==pCur->eState ); |
| 53540 | + assert( CURSOR_VALID==pCur->eState || CURSOR_SKIPNEXT==pCur->eState ); |
| 53526 | 53541 | assert( 0==pCur->pKey ); |
| 53527 | 53542 | assert( cursorHoldsMutex(pCur) ); |
| 53528 | 53543 | |
| 53544 | + if( pCur->eState==CURSOR_SKIPNEXT ){ |
| 53545 | + pCur->eState = CURSOR_VALID; |
| 53546 | + }else{ |
| 53547 | + pCur->skipNext = 0; |
| 53548 | + } |
| 53529 | 53549 | rc = sqlite3BtreeKeySize(pCur, &pCur->nKey); |
| 53530 | 53550 | assert( rc==SQLITE_OK ); /* KeySize() cannot fail */ |
| 53531 | 53551 | |
| 53532 | 53552 | /* If this is an intKey table, then the above call to BtreeKeySize() |
| 53533 | 53553 | ** stores the integer key in pCur->nKey. In this case this value is |
| | @@ -53594,11 +53614,11 @@ |
| 53594 | 53614 | Pgno iRoot, /* Only save cursor with this iRoot. Save all if zero */ |
| 53595 | 53615 | BtCursor *pExcept /* Do not save this cursor */ |
| 53596 | 53616 | ){ |
| 53597 | 53617 | do{ |
| 53598 | 53618 | if( p!=pExcept && (0==iRoot || p->pgnoRoot==iRoot) ){ |
| 53599 | | - if( p->eState==CURSOR_VALID ){ |
| 53619 | + if( p->eState==CURSOR_VALID || p->eState==CURSOR_SKIPNEXT ){ |
| 53600 | 53620 | int rc = saveCursorPosition(p); |
| 53601 | 53621 | if( SQLITE_OK!=rc ){ |
| 53602 | 53622 | return rc; |
| 53603 | 53623 | } |
| 53604 | 53624 | }else{ |
| | @@ -53666,21 +53686,23 @@ |
| 53666 | 53686 | ** at most one effective restoreCursorPosition() call after each |
| 53667 | 53687 | ** saveCursorPosition(). |
| 53668 | 53688 | */ |
| 53669 | 53689 | static int btreeRestoreCursorPosition(BtCursor *pCur){ |
| 53670 | 53690 | int rc; |
| 53691 | + int skipNext; |
| 53671 | 53692 | assert( cursorHoldsMutex(pCur) ); |
| 53672 | 53693 | assert( pCur->eState>=CURSOR_REQUIRESEEK ); |
| 53673 | 53694 | if( pCur->eState==CURSOR_FAULT ){ |
| 53674 | 53695 | return pCur->skipNext; |
| 53675 | 53696 | } |
| 53676 | 53697 | pCur->eState = CURSOR_INVALID; |
| 53677 | | - rc = btreeMoveto(pCur, pCur->pKey, pCur->nKey, 0, &pCur->skipNext); |
| 53698 | + rc = btreeMoveto(pCur, pCur->pKey, pCur->nKey, 0, &skipNext); |
| 53678 | 53699 | if( rc==SQLITE_OK ){ |
| 53679 | 53700 | sqlite3_free(pCur->pKey); |
| 53680 | 53701 | pCur->pKey = 0; |
| 53681 | 53702 | assert( pCur->eState==CURSOR_VALID || pCur->eState==CURSOR_INVALID ); |
| 53703 | + pCur->skipNext |= skipNext; |
| 53682 | 53704 | if( pCur->skipNext && pCur->eState==CURSOR_VALID ){ |
| 53683 | 53705 | pCur->eState = CURSOR_SKIPNEXT; |
| 53684 | 53706 | } |
| 53685 | 53707 | } |
| 53686 | 53708 | return rc; |
| | @@ -53728,13 +53750,14 @@ |
| 53728 | 53750 | rc = restoreCursorPosition(pCur); |
| 53729 | 53751 | if( rc ){ |
| 53730 | 53752 | *pDifferentRow = 1; |
| 53731 | 53753 | return rc; |
| 53732 | 53754 | } |
| 53733 | | - if( pCur->eState!=CURSOR_VALID || NEVER(pCur->skipNext!=0) ){ |
| 53755 | + if( pCur->eState!=CURSOR_VALID ){ |
| 53734 | 53756 | *pDifferentRow = 1; |
| 53735 | 53757 | }else{ |
| 53758 | + assert( pCur->skipNext==0 ); |
| 53736 | 53759 | *pDifferentRow = 0; |
| 53737 | 53760 | } |
| 53738 | 53761 | return SQLITE_OK; |
| 53739 | 53762 | } |
| 53740 | 53763 | |
| | @@ -56545,11 +56568,11 @@ |
| 56545 | 56568 | if( pBtree ){ |
| 56546 | 56569 | sqlite3BtreeEnter(pBtree); |
| 56547 | 56570 | for(p=pBtree->pBt->pCursor; p; p=p->pNext){ |
| 56548 | 56571 | int i; |
| 56549 | 56572 | if( writeOnly && (p->curFlags & BTCF_WriteFlag)==0 ){ |
| 56550 | | - if( p->eState==CURSOR_VALID ){ |
| 56573 | + if( p->eState==CURSOR_VALID || p->eState==CURSOR_SKIPNEXT ){ |
| 56551 | 56574 | rc = saveCursorPosition(p); |
| 56552 | 56575 | if( rc!=SQLITE_OK ){ |
| 56553 | 56576 | (void)sqlite3BtreeTripAllCursors(pBtree, rc, 0); |
| 56554 | 56577 | break; |
| 56555 | 56578 | } |
| | @@ -56951,10 +56974,12 @@ |
| 56951 | 56974 | ** to return an integer result code for historical reasons. |
| 56952 | 56975 | */ |
| 56953 | 56976 | SQLITE_PRIVATE int sqlite3BtreeDataSize(BtCursor *pCur, u32 *pSize){ |
| 56954 | 56977 | assert( cursorHoldsMutex(pCur) ); |
| 56955 | 56978 | assert( pCur->eState==CURSOR_VALID ); |
| 56979 | + assert( pCur->iPage>=0 ); |
| 56980 | + assert( pCur->iPage<BTCURSOR_MAX_DEPTH ); |
| 56956 | 56981 | assert( pCur->apPage[pCur->iPage]->intKeyLeaf==1 ); |
| 56957 | 56982 | getCellInfo(pCur); |
| 56958 | 56983 | *pSize = pCur->info.nPayload; |
| 56959 | 56984 | return SQLITE_OK; |
| 56960 | 56985 | } |
| | @@ -57429,19 +57454,21 @@ |
| 57429 | 57454 | return SQLITE_CORRUPT_BKPT; |
| 57430 | 57455 | } |
| 57431 | 57456 | return SQLITE_OK; |
| 57432 | 57457 | } |
| 57433 | 57458 | |
| 57434 | | -#if 0 |
| 57459 | +#if SQLITE_DEBUG |
| 57435 | 57460 | /* |
| 57436 | 57461 | ** Page pParent is an internal (non-leaf) tree page. This function |
| 57437 | 57462 | ** asserts that page number iChild is the left-child if the iIdx'th |
| 57438 | 57463 | ** cell in page pParent. Or, if iIdx is equal to the total number of |
| 57439 | 57464 | ** cells in pParent, that page number iChild is the right-child of |
| 57440 | 57465 | ** the page. |
| 57441 | 57466 | */ |
| 57442 | 57467 | static void assertParentIndex(MemPage *pParent, int iIdx, Pgno iChild){ |
| 57468 | + if( CORRUPT_DB ) return; /* The conditions tested below might not be true |
| 57469 | + ** in a corrupt database */ |
| 57443 | 57470 | assert( iIdx<=pParent->nCell ); |
| 57444 | 57471 | if( iIdx==pParent->nCell ){ |
| 57445 | 57472 | assert( get4byte(&pParent->aData[pParent->hdrOffset+8])==iChild ); |
| 57446 | 57473 | }else{ |
| 57447 | 57474 | assert( get4byte(findCell(pParent, iIdx))==iChild ); |
| | @@ -57462,23 +57489,15 @@ |
| 57462 | 57489 | static void moveToParent(BtCursor *pCur){ |
| 57463 | 57490 | assert( cursorHoldsMutex(pCur) ); |
| 57464 | 57491 | assert( pCur->eState==CURSOR_VALID ); |
| 57465 | 57492 | assert( pCur->iPage>0 ); |
| 57466 | 57493 | assert( pCur->apPage[pCur->iPage] ); |
| 57467 | | - |
| 57468 | | - /* UPDATE: It is actually possible for the condition tested by the assert |
| 57469 | | - ** below to be untrue if the database file is corrupt. This can occur if |
| 57470 | | - ** one cursor has modified page pParent while a reference to it is held |
| 57471 | | - ** by a second cursor. Which can only happen if a single page is linked |
| 57472 | | - ** into more than one b-tree structure in a corrupt database. */ |
| 57473 | | -#if 0 |
| 57474 | 57494 | assertParentIndex( |
| 57475 | 57495 | pCur->apPage[pCur->iPage-1], |
| 57476 | 57496 | pCur->aiIdx[pCur->iPage-1], |
| 57477 | 57497 | pCur->apPage[pCur->iPage]->pgno |
| 57478 | 57498 | ); |
| 57479 | | -#endif |
| 57480 | 57499 | testcase( pCur->aiIdx[pCur->iPage-1] > pCur->apPage[pCur->iPage-1]->nCell ); |
| 57481 | 57500 | |
| 57482 | 57501 | releasePage(pCur->apPage[pCur->iPage]); |
| 57483 | 57502 | pCur->iPage--; |
| 57484 | 57503 | pCur->info.nSize = 0; |
| | @@ -60422,10 +60441,11 @@ |
| 60422 | 60441 | pPage->nOverflow = 0; |
| 60423 | 60442 | |
| 60424 | 60443 | /* The next iteration of the do-loop balances the parent page. */ |
| 60425 | 60444 | releasePage(pPage); |
| 60426 | 60445 | pCur->iPage--; |
| 60446 | + assert( pCur->iPage>=0 ); |
| 60427 | 60447 | } |
| 60428 | 60448 | }while( rc==SQLITE_OK ); |
| 60429 | 60449 | |
| 60430 | 60450 | if( pFree ){ |
| 60431 | 60451 | sqlite3PageFree(pFree); |
| | @@ -60893,29 +60913,32 @@ |
| 60893 | 60913 | int rc; |
| 60894 | 60914 | unsigned char *pCell; |
| 60895 | 60915 | int i; |
| 60896 | 60916 | int hdr; |
| 60897 | 60917 | u16 szCell; |
| 60918 | + u8 hasChildren; |
| 60898 | 60919 | |
| 60899 | 60920 | assert( sqlite3_mutex_held(pBt->mutex) ); |
| 60900 | 60921 | if( pgno>btreePagecount(pBt) ){ |
| 60901 | 60922 | return SQLITE_CORRUPT_BKPT; |
| 60902 | 60923 | } |
| 60903 | 60924 | |
| 60904 | 60925 | rc = getAndInitPage(pBt, pgno, &pPage, 0); |
| 60905 | 60926 | if( rc ) return rc; |
| 60927 | + hasChildren = !pPage->leaf; |
| 60928 | + pPage->leaf = 1; /* Block looping if the database is corrupt */ |
| 60906 | 60929 | hdr = pPage->hdrOffset; |
| 60907 | 60930 | for(i=0; i<pPage->nCell; i++){ |
| 60908 | 60931 | pCell = findCell(pPage, i); |
| 60909 | | - if( !pPage->leaf ){ |
| 60932 | + if( hasChildren ){ |
| 60910 | 60933 | rc = clearDatabasePage(pBt, get4byte(pCell), 1, pnChange); |
| 60911 | 60934 | if( rc ) goto cleardatabasepage_out; |
| 60912 | 60935 | } |
| 60913 | 60936 | rc = clearCell(pPage, pCell, &szCell); |
| 60914 | 60937 | if( rc ) goto cleardatabasepage_out; |
| 60915 | 60938 | } |
| 60916 | | - if( !pPage->leaf ){ |
| 60939 | + if( hasChildren ){ |
| 60917 | 60940 | rc = clearDatabasePage(pBt, get4byte(&pPage->aData[hdr+8]), 1, pnChange); |
| 60918 | 60941 | if( rc ) goto cleardatabasepage_out; |
| 60919 | 60942 | }else if( pnChange ){ |
| 60920 | 60943 | assert( pPage->intKey ); |
| 60921 | 60944 | *pnChange += pPage->nCell; |
| | @@ -62239,11 +62262,11 @@ |
| 62239 | 62262 | ** a pointer to the new sqlite3_backup object. |
| 62240 | 62263 | ** |
| 62241 | 62264 | ** If an error occurs, NULL is returned and an error code and error message |
| 62242 | 62265 | ** stored in database handle pDestDb. |
| 62243 | 62266 | */ |
| 62244 | | -SQLITE_API sqlite3_backup *sqlite3_backup_init( |
| 62267 | +SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init( |
| 62245 | 62268 | sqlite3* pDestDb, /* Database to write to */ |
| 62246 | 62269 | const char *zDestDb, /* Name of database within pDestDb */ |
| 62247 | 62270 | sqlite3* pSrcDb, /* Database connection to read from */ |
| 62248 | 62271 | const char *zSrcDb /* Name of database within pSrcDb */ |
| 62249 | 62272 | ){ |
| | @@ -62447,11 +62470,11 @@ |
| 62447 | 62470 | } |
| 62448 | 62471 | |
| 62449 | 62472 | /* |
| 62450 | 62473 | ** Copy nPage pages from the source b-tree to the destination. |
| 62451 | 62474 | */ |
| 62452 | | -SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage){ |
| 62475 | +SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage){ |
| 62453 | 62476 | int rc; |
| 62454 | 62477 | int destMode; /* Destination journal mode */ |
| 62455 | 62478 | int pgszSrc = 0; /* Source page size */ |
| 62456 | 62479 | int pgszDest = 0; /* Destination page size */ |
| 62457 | 62480 | |
| | @@ -62692,11 +62715,11 @@ |
| 62692 | 62715 | } |
| 62693 | 62716 | |
| 62694 | 62717 | /* |
| 62695 | 62718 | ** Release all resources associated with an sqlite3_backup* handle. |
| 62696 | 62719 | */ |
| 62697 | | -SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p){ |
| 62720 | +SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p){ |
| 62698 | 62721 | sqlite3_backup **pp; /* Ptr to head of pagers backup list */ |
| 62699 | 62722 | sqlite3 *pSrcDb; /* Source database connection */ |
| 62700 | 62723 | int rc; /* Value to return */ |
| 62701 | 62724 | |
| 62702 | 62725 | /* Enter the mutexes */ |
| | @@ -62744,11 +62767,11 @@ |
| 62744 | 62767 | |
| 62745 | 62768 | /* |
| 62746 | 62769 | ** Return the number of pages still to be backed up as of the most recent |
| 62747 | 62770 | ** call to sqlite3_backup_step(). |
| 62748 | 62771 | */ |
| 62749 | | -SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p){ |
| 62772 | +SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p){ |
| 62750 | 62773 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 62751 | 62774 | if( p==0 ){ |
| 62752 | 62775 | (void)SQLITE_MISUSE_BKPT; |
| 62753 | 62776 | return 0; |
| 62754 | 62777 | } |
| | @@ -62758,11 +62781,11 @@ |
| 62758 | 62781 | |
| 62759 | 62782 | /* |
| 62760 | 62783 | ** Return the total number of pages in the source database as of the most |
| 62761 | 62784 | ** recent call to sqlite3_backup_step(). |
| 62762 | 62785 | */ |
| 62763 | | -SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p){ |
| 62786 | +SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p){ |
| 62764 | 62787 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 62765 | 62788 | if( p==0 ){ |
| 62766 | 62789 | (void)SQLITE_MISUSE_BKPT; |
| 62767 | 62790 | return 0; |
| 62768 | 62791 | } |
| | @@ -64633,11 +64656,11 @@ |
| 64633 | 64656 | } |
| 64634 | 64657 | |
| 64635 | 64658 | /* |
| 64636 | 64659 | ** Return the SQL associated with a prepared statement |
| 64637 | 64660 | */ |
| 64638 | | -SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt){ |
| 64661 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt){ |
| 64639 | 64662 | Vdbe *p = (Vdbe *)pStmt; |
| 64640 | 64663 | return (p && p->isPrepareV2) ? p->zSql : 0; |
| 64641 | 64664 | } |
| 64642 | 64665 | |
| 64643 | 64666 | /* |
| | @@ -68789,11 +68812,11 @@ |
| 68789 | 68812 | ** execution environment changes in a way that would alter the program |
| 68790 | 68813 | ** that sqlite3_prepare() generates. For example, if new functions or |
| 68791 | 68814 | ** collating sequences are registered or if an authorizer function is |
| 68792 | 68815 | ** added or changed. |
| 68793 | 68816 | */ |
| 68794 | | -SQLITE_API int sqlite3_expired(sqlite3_stmt *pStmt){ |
| 68817 | +SQLITE_API int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt *pStmt){ |
| 68795 | 68818 | Vdbe *p = (Vdbe*)pStmt; |
| 68796 | 68819 | return p==0 || p->expired; |
| 68797 | 68820 | } |
| 68798 | 68821 | #endif |
| 68799 | 68822 | |
| | @@ -68826,11 +68849,11 @@ |
| 68826 | 68849 | ** machine. |
| 68827 | 68850 | ** |
| 68828 | 68851 | ** This routine sets the error code and string returned by |
| 68829 | 68852 | ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). |
| 68830 | 68853 | */ |
| 68831 | | -SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt){ |
| 68854 | +SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt){ |
| 68832 | 68855 | int rc; |
| 68833 | 68856 | if( pStmt==0 ){ |
| 68834 | 68857 | /* IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL |
| 68835 | 68858 | ** pointer is a harmless no-op. */ |
| 68836 | 68859 | rc = SQLITE_OK; |
| | @@ -68852,11 +68875,11 @@ |
| 68852 | 68875 | ** the prior execution is returned. |
| 68853 | 68876 | ** |
| 68854 | 68877 | ** This routine sets the error code and string returned by |
| 68855 | 68878 | ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). |
| 68856 | 68879 | */ |
| 68857 | | -SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt){ |
| 68880 | +SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt){ |
| 68858 | 68881 | int rc; |
| 68859 | 68882 | if( pStmt==0 ){ |
| 68860 | 68883 | rc = SQLITE_OK; |
| 68861 | 68884 | }else{ |
| 68862 | 68885 | Vdbe *v = (Vdbe*)pStmt; |
| | @@ -68871,11 +68894,11 @@ |
| 68871 | 68894 | } |
| 68872 | 68895 | |
| 68873 | 68896 | /* |
| 68874 | 68897 | ** Set all the parameters in the compiled SQL statement to NULL. |
| 68875 | 68898 | */ |
| 68876 | | -SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt *pStmt){ |
| 68899 | +SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt *pStmt){ |
| 68877 | 68900 | int i; |
| 68878 | 68901 | int rc = SQLITE_OK; |
| 68879 | 68902 | Vdbe *p = (Vdbe*)pStmt; |
| 68880 | 68903 | #if SQLITE_THREADSAFE |
| 68881 | 68904 | sqlite3_mutex *mutex = ((Vdbe*)pStmt)->db->mutex; |
| | @@ -68895,54 +68918,54 @@ |
| 68895 | 68918 | |
| 68896 | 68919 | /**************************** sqlite3_value_ ******************************* |
| 68897 | 68920 | ** The following routines extract information from a Mem or sqlite3_value |
| 68898 | 68921 | ** structure. |
| 68899 | 68922 | */ |
| 68900 | | -SQLITE_API const void *sqlite3_value_blob(sqlite3_value *pVal){ |
| 68923 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value *pVal){ |
| 68901 | 68924 | Mem *p = (Mem*)pVal; |
| 68902 | 68925 | if( p->flags & (MEM_Blob|MEM_Str) ){ |
| 68903 | 68926 | sqlite3VdbeMemExpandBlob(p); |
| 68904 | 68927 | p->flags |= MEM_Blob; |
| 68905 | 68928 | return p->n ? p->z : 0; |
| 68906 | 68929 | }else{ |
| 68907 | 68930 | return sqlite3_value_text(pVal); |
| 68908 | 68931 | } |
| 68909 | 68932 | } |
| 68910 | | -SQLITE_API int sqlite3_value_bytes(sqlite3_value *pVal){ |
| 68933 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value *pVal){ |
| 68911 | 68934 | return sqlite3ValueBytes(pVal, SQLITE_UTF8); |
| 68912 | 68935 | } |
| 68913 | | -SQLITE_API int sqlite3_value_bytes16(sqlite3_value *pVal){ |
| 68936 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value *pVal){ |
| 68914 | 68937 | return sqlite3ValueBytes(pVal, SQLITE_UTF16NATIVE); |
| 68915 | 68938 | } |
| 68916 | | -SQLITE_API double sqlite3_value_double(sqlite3_value *pVal){ |
| 68939 | +SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value *pVal){ |
| 68917 | 68940 | return sqlite3VdbeRealValue((Mem*)pVal); |
| 68918 | 68941 | } |
| 68919 | | -SQLITE_API int sqlite3_value_int(sqlite3_value *pVal){ |
| 68942 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value *pVal){ |
| 68920 | 68943 | return (int)sqlite3VdbeIntValue((Mem*)pVal); |
| 68921 | 68944 | } |
| 68922 | | -SQLITE_API sqlite_int64 sqlite3_value_int64(sqlite3_value *pVal){ |
| 68945 | +SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value *pVal){ |
| 68923 | 68946 | return sqlite3VdbeIntValue((Mem*)pVal); |
| 68924 | 68947 | } |
| 68925 | | -SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value *pVal){ |
| 68948 | +SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value *pVal){ |
| 68926 | 68949 | return (const unsigned char *)sqlite3ValueText(pVal, SQLITE_UTF8); |
| 68927 | 68950 | } |
| 68928 | 68951 | #ifndef SQLITE_OMIT_UTF16 |
| 68929 | | -SQLITE_API const void *sqlite3_value_text16(sqlite3_value* pVal){ |
| 68952 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value* pVal){ |
| 68930 | 68953 | return sqlite3ValueText(pVal, SQLITE_UTF16NATIVE); |
| 68931 | 68954 | } |
| 68932 | | -SQLITE_API const void *sqlite3_value_text16be(sqlite3_value *pVal){ |
| 68955 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value *pVal){ |
| 68933 | 68956 | return sqlite3ValueText(pVal, SQLITE_UTF16BE); |
| 68934 | 68957 | } |
| 68935 | | -SQLITE_API const void *sqlite3_value_text16le(sqlite3_value *pVal){ |
| 68958 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value *pVal){ |
| 68936 | 68959 | return sqlite3ValueText(pVal, SQLITE_UTF16LE); |
| 68937 | 68960 | } |
| 68938 | 68961 | #endif /* SQLITE_OMIT_UTF16 */ |
| 68939 | 68962 | /* EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five |
| 68940 | 68963 | ** fundamental datatypes: 64-bit signed integer 64-bit IEEE floating |
| 68941 | 68964 | ** point number string BLOB NULL |
| 68942 | 68965 | */ |
| 68943 | | -SQLITE_API int sqlite3_value_type(sqlite3_value* pVal){ |
| 68966 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value* pVal){ |
| 68944 | 68967 | static const u8 aType[] = { |
| 68945 | 68968 | SQLITE_BLOB, /* 0x00 */ |
| 68946 | 68969 | SQLITE_NULL, /* 0x01 */ |
| 68947 | 68970 | SQLITE_TEXT, /* 0x02 */ |
| 68948 | 68971 | SQLITE_NULL, /* 0x03 */ |
| | @@ -69014,21 +69037,21 @@ |
| 69014 | 69037 | xDel((void*)p); |
| 69015 | 69038 | } |
| 69016 | 69039 | if( pCtx ) sqlite3_result_error_toobig(pCtx); |
| 69017 | 69040 | return SQLITE_TOOBIG; |
| 69018 | 69041 | } |
| 69019 | | -SQLITE_API void sqlite3_result_blob( |
| 69042 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_blob( |
| 69020 | 69043 | sqlite3_context *pCtx, |
| 69021 | 69044 | const void *z, |
| 69022 | 69045 | int n, |
| 69023 | 69046 | void (*xDel)(void *) |
| 69024 | 69047 | ){ |
| 69025 | 69048 | assert( n>=0 ); |
| 69026 | 69049 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 69027 | 69050 | setResultStrOrError(pCtx, z, n, 0, xDel); |
| 69028 | 69051 | } |
| 69029 | | -SQLITE_API void sqlite3_result_blob64( |
| 69052 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64( |
| 69030 | 69053 | sqlite3_context *pCtx, |
| 69031 | 69054 | const void *z, |
| 69032 | 69055 | sqlite3_uint64 n, |
| 69033 | 69056 | void (*xDel)(void *) |
| 69034 | 69057 | ){ |
| | @@ -69038,50 +69061,50 @@ |
| 69038 | 69061 | (void)invokeValueDestructor(z, xDel, pCtx); |
| 69039 | 69062 | }else{ |
| 69040 | 69063 | setResultStrOrError(pCtx, z, (int)n, 0, xDel); |
| 69041 | 69064 | } |
| 69042 | 69065 | } |
| 69043 | | -SQLITE_API void sqlite3_result_double(sqlite3_context *pCtx, double rVal){ |
| 69066 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context *pCtx, double rVal){ |
| 69044 | 69067 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 69045 | 69068 | sqlite3VdbeMemSetDouble(pCtx->pOut, rVal); |
| 69046 | 69069 | } |
| 69047 | | -SQLITE_API void sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){ |
| 69070 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){ |
| 69048 | 69071 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 69049 | 69072 | pCtx->isError = SQLITE_ERROR; |
| 69050 | 69073 | pCtx->fErrorOrAux = 1; |
| 69051 | 69074 | sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF8, SQLITE_TRANSIENT); |
| 69052 | 69075 | } |
| 69053 | 69076 | #ifndef SQLITE_OMIT_UTF16 |
| 69054 | | -SQLITE_API void sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){ |
| 69077 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){ |
| 69055 | 69078 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 69056 | 69079 | pCtx->isError = SQLITE_ERROR; |
| 69057 | 69080 | pCtx->fErrorOrAux = 1; |
| 69058 | 69081 | sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT); |
| 69059 | 69082 | } |
| 69060 | 69083 | #endif |
| 69061 | | -SQLITE_API void sqlite3_result_int(sqlite3_context *pCtx, int iVal){ |
| 69084 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context *pCtx, int iVal){ |
| 69062 | 69085 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 69063 | 69086 | sqlite3VdbeMemSetInt64(pCtx->pOut, (i64)iVal); |
| 69064 | 69087 | } |
| 69065 | | -SQLITE_API void sqlite3_result_int64(sqlite3_context *pCtx, i64 iVal){ |
| 69088 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context *pCtx, i64 iVal){ |
| 69066 | 69089 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 69067 | 69090 | sqlite3VdbeMemSetInt64(pCtx->pOut, iVal); |
| 69068 | 69091 | } |
| 69069 | | -SQLITE_API void sqlite3_result_null(sqlite3_context *pCtx){ |
| 69092 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context *pCtx){ |
| 69070 | 69093 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 69071 | 69094 | sqlite3VdbeMemSetNull(pCtx->pOut); |
| 69072 | 69095 | } |
| 69073 | | -SQLITE_API void sqlite3_result_text( |
| 69096 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text( |
| 69074 | 69097 | sqlite3_context *pCtx, |
| 69075 | 69098 | const char *z, |
| 69076 | 69099 | int n, |
| 69077 | 69100 | void (*xDel)(void *) |
| 69078 | 69101 | ){ |
| 69079 | 69102 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 69080 | 69103 | setResultStrOrError(pCtx, z, n, SQLITE_UTF8, xDel); |
| 69081 | 69104 | } |
| 69082 | | -SQLITE_API void sqlite3_result_text64( |
| 69105 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text64( |
| 69083 | 69106 | sqlite3_context *pCtx, |
| 69084 | 69107 | const char *z, |
| 69085 | 69108 | sqlite3_uint64 n, |
| 69086 | 69109 | void (*xDel)(void *), |
| 69087 | 69110 | unsigned char enc |
| | @@ -69094,47 +69117,47 @@ |
| 69094 | 69117 | }else{ |
| 69095 | 69118 | setResultStrOrError(pCtx, z, (int)n, enc, xDel); |
| 69096 | 69119 | } |
| 69097 | 69120 | } |
| 69098 | 69121 | #ifndef SQLITE_OMIT_UTF16 |
| 69099 | | -SQLITE_API void sqlite3_result_text16( |
| 69122 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text16( |
| 69100 | 69123 | sqlite3_context *pCtx, |
| 69101 | 69124 | const void *z, |
| 69102 | 69125 | int n, |
| 69103 | 69126 | void (*xDel)(void *) |
| 69104 | 69127 | ){ |
| 69105 | 69128 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 69106 | 69129 | setResultStrOrError(pCtx, z, n, SQLITE_UTF16NATIVE, xDel); |
| 69107 | 69130 | } |
| 69108 | | -SQLITE_API void sqlite3_result_text16be( |
| 69131 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be( |
| 69109 | 69132 | sqlite3_context *pCtx, |
| 69110 | 69133 | const void *z, |
| 69111 | 69134 | int n, |
| 69112 | 69135 | void (*xDel)(void *) |
| 69113 | 69136 | ){ |
| 69114 | 69137 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 69115 | 69138 | setResultStrOrError(pCtx, z, n, SQLITE_UTF16BE, xDel); |
| 69116 | 69139 | } |
| 69117 | | -SQLITE_API void sqlite3_result_text16le( |
| 69140 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le( |
| 69118 | 69141 | sqlite3_context *pCtx, |
| 69119 | 69142 | const void *z, |
| 69120 | 69143 | int n, |
| 69121 | 69144 | void (*xDel)(void *) |
| 69122 | 69145 | ){ |
| 69123 | 69146 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 69124 | 69147 | setResultStrOrError(pCtx, z, n, SQLITE_UTF16LE, xDel); |
| 69125 | 69148 | } |
| 69126 | 69149 | #endif /* SQLITE_OMIT_UTF16 */ |
| 69127 | | -SQLITE_API void sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){ |
| 69150 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){ |
| 69128 | 69151 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 69129 | 69152 | sqlite3VdbeMemCopy(pCtx->pOut, pValue); |
| 69130 | 69153 | } |
| 69131 | | -SQLITE_API void sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){ |
| 69154 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){ |
| 69132 | 69155 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 69133 | 69156 | sqlite3VdbeMemSetZeroBlob(pCtx->pOut, n); |
| 69134 | 69157 | } |
| 69135 | | -SQLITE_API void sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){ |
| 69158 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){ |
| 69136 | 69159 | pCtx->isError = errCode; |
| 69137 | 69160 | pCtx->fErrorOrAux = 1; |
| 69138 | 69161 | #ifdef SQLITE_DEBUG |
| 69139 | 69162 | if( pCtx->pVdbe ) pCtx->pVdbe->rcApp = errCode; |
| 69140 | 69163 | #endif |
| | @@ -69143,20 +69166,20 @@ |
| 69143 | 69166 | SQLITE_UTF8, SQLITE_STATIC); |
| 69144 | 69167 | } |
| 69145 | 69168 | } |
| 69146 | 69169 | |
| 69147 | 69170 | /* Force an SQLITE_TOOBIG error. */ |
| 69148 | | -SQLITE_API void sqlite3_result_error_toobig(sqlite3_context *pCtx){ |
| 69171 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context *pCtx){ |
| 69149 | 69172 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 69150 | 69173 | pCtx->isError = SQLITE_TOOBIG; |
| 69151 | 69174 | pCtx->fErrorOrAux = 1; |
| 69152 | 69175 | sqlite3VdbeMemSetStr(pCtx->pOut, "string or blob too big", -1, |
| 69153 | 69176 | SQLITE_UTF8, SQLITE_STATIC); |
| 69154 | 69177 | } |
| 69155 | 69178 | |
| 69156 | 69179 | /* An SQLITE_NOMEM error. */ |
| 69157 | | -SQLITE_API void sqlite3_result_error_nomem(sqlite3_context *pCtx){ |
| 69180 | +SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context *pCtx){ |
| 69158 | 69181 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 69159 | 69182 | sqlite3VdbeMemSetNull(pCtx->pOut); |
| 69160 | 69183 | pCtx->isError = SQLITE_NOMEM; |
| 69161 | 69184 | pCtx->fErrorOrAux = 1; |
| 69162 | 69185 | pCtx->pOut->db->mallocFailed = 1; |
| | @@ -69325,11 +69348,11 @@ |
| 69325 | 69348 | /* |
| 69326 | 69349 | ** This is the top-level implementation of sqlite3_step(). Call |
| 69327 | 69350 | ** sqlite3Step() to do most of the work. If a schema error occurs, |
| 69328 | 69351 | ** call sqlite3Reprepare() and try again. |
| 69329 | 69352 | */ |
| 69330 | | -SQLITE_API int sqlite3_step(sqlite3_stmt *pStmt){ |
| 69353 | +SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt *pStmt){ |
| 69331 | 69354 | int rc = SQLITE_OK; /* Result from sqlite3Step() */ |
| 69332 | 69355 | int rc2 = SQLITE_OK; /* Result from sqlite3Reprepare() */ |
| 69333 | 69356 | Vdbe *v = (Vdbe*)pStmt; /* the prepared statement */ |
| 69334 | 69357 | int cnt = 0; /* Counter to prevent infinite loop of reprepares */ |
| 69335 | 69358 | sqlite3 *db; /* The database connection */ |
| | @@ -69376,11 +69399,11 @@ |
| 69376 | 69399 | |
| 69377 | 69400 | /* |
| 69378 | 69401 | ** Extract the user data from a sqlite3_context structure and return a |
| 69379 | 69402 | ** pointer to it. |
| 69380 | 69403 | */ |
| 69381 | | -SQLITE_API void *sqlite3_user_data(sqlite3_context *p){ |
| 69404 | +SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context *p){ |
| 69382 | 69405 | assert( p && p->pFunc ); |
| 69383 | 69406 | return p->pFunc->pUserData; |
| 69384 | 69407 | } |
| 69385 | 69408 | |
| 69386 | 69409 | /* |
| | @@ -69391,11 +69414,11 @@ |
| 69391 | 69414 | ** returns a copy of the pointer to the database connection (the 1st |
| 69392 | 69415 | ** parameter) of the sqlite3_create_function() and |
| 69393 | 69416 | ** sqlite3_create_function16() routines that originally registered the |
| 69394 | 69417 | ** application defined function. |
| 69395 | 69418 | */ |
| 69396 | | -SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context *p){ |
| 69419 | +SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context *p){ |
| 69397 | 69420 | assert( p && p->pFunc ); |
| 69398 | 69421 | return p->pOut->db; |
| 69399 | 69422 | } |
| 69400 | 69423 | |
| 69401 | 69424 | /* |
| | @@ -69467,11 +69490,11 @@ |
| 69467 | 69490 | /* |
| 69468 | 69491 | ** Allocate or return the aggregate context for a user function. A new |
| 69469 | 69492 | ** context is allocated on the first call. Subsequent calls return the |
| 69470 | 69493 | ** same context that was returned on prior calls. |
| 69471 | 69494 | */ |
| 69472 | | -SQLITE_API void *sqlite3_aggregate_context(sqlite3_context *p, int nByte){ |
| 69495 | +SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context *p, int nByte){ |
| 69473 | 69496 | assert( p && p->pFunc && p->pFunc->xStep ); |
| 69474 | 69497 | assert( sqlite3_mutex_held(p->pOut->db->mutex) ); |
| 69475 | 69498 | testcase( nByte<0 ); |
| 69476 | 69499 | if( (p->pMem->flags & MEM_Agg)==0 ){ |
| 69477 | 69500 | return createAggContext(p, nByte); |
| | @@ -69482,11 +69505,11 @@ |
| 69482 | 69505 | |
| 69483 | 69506 | /* |
| 69484 | 69507 | ** Return the auxiliary data pointer, if any, for the iArg'th argument to |
| 69485 | 69508 | ** the user-function defined by pCtx. |
| 69486 | 69509 | */ |
| 69487 | | -SQLITE_API void *sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){ |
| 69510 | +SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){ |
| 69488 | 69511 | AuxData *pAuxData; |
| 69489 | 69512 | |
| 69490 | 69513 | assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); |
| 69491 | 69514 | #if SQLITE_ENABLE_STAT3_OR_STAT4 |
| 69492 | 69515 | if( pCtx->pVdbe==0 ) return 0; |
| | @@ -69503,11 +69526,11 @@ |
| 69503 | 69526 | /* |
| 69504 | 69527 | ** Set the auxiliary data pointer and delete function, for the iArg'th |
| 69505 | 69528 | ** argument to the user-function defined by pCtx. Any previous value is |
| 69506 | 69529 | ** deleted by calling the delete function specified when it was set. |
| 69507 | 69530 | */ |
| 69508 | | -SQLITE_API void sqlite3_set_auxdata( |
| 69531 | +SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata( |
| 69509 | 69532 | sqlite3_context *pCtx, |
| 69510 | 69533 | int iArg, |
| 69511 | 69534 | void *pAux, |
| 69512 | 69535 | void (*xDelete)(void*) |
| 69513 | 69536 | ){ |
| | @@ -69558,29 +69581,29 @@ |
| 69558 | 69581 | ** This function is deprecated. Do not use it for new code. It is |
| 69559 | 69582 | ** provide only to avoid breaking legacy code. New aggregate function |
| 69560 | 69583 | ** implementations should keep their own counts within their aggregate |
| 69561 | 69584 | ** context. |
| 69562 | 69585 | */ |
| 69563 | | -SQLITE_API int sqlite3_aggregate_count(sqlite3_context *p){ |
| 69586 | +SQLITE_API int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context *p){ |
| 69564 | 69587 | assert( p && p->pMem && p->pFunc && p->pFunc->xStep ); |
| 69565 | 69588 | return p->pMem->n; |
| 69566 | 69589 | } |
| 69567 | 69590 | #endif |
| 69568 | 69591 | |
| 69569 | 69592 | /* |
| 69570 | 69593 | ** Return the number of columns in the result set for the statement pStmt. |
| 69571 | 69594 | */ |
| 69572 | | -SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt){ |
| 69595 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt){ |
| 69573 | 69596 | Vdbe *pVm = (Vdbe *)pStmt; |
| 69574 | 69597 | return pVm ? pVm->nResColumn : 0; |
| 69575 | 69598 | } |
| 69576 | 69599 | |
| 69577 | 69600 | /* |
| 69578 | 69601 | ** Return the number of values available from the current row of the |
| 69579 | 69602 | ** currently executing statement pStmt. |
| 69580 | 69603 | */ |
| 69581 | | -SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt){ |
| 69604 | +SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt){ |
| 69582 | 69605 | Vdbe *pVm = (Vdbe *)pStmt; |
| 69583 | 69606 | if( pVm==0 || pVm->pResultSet==0 ) return 0; |
| 69584 | 69607 | return pVm->nResColumn; |
| 69585 | 69608 | } |
| 69586 | 69609 | |
| | @@ -69678,67 +69701,67 @@ |
| 69678 | 69701 | |
| 69679 | 69702 | /**************************** sqlite3_column_ ******************************* |
| 69680 | 69703 | ** The following routines are used to access elements of the current row |
| 69681 | 69704 | ** in the result set. |
| 69682 | 69705 | */ |
| 69683 | | -SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt *pStmt, int i){ |
| 69706 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt *pStmt, int i){ |
| 69684 | 69707 | const void *val; |
| 69685 | 69708 | val = sqlite3_value_blob( columnMem(pStmt,i) ); |
| 69686 | 69709 | /* Even though there is no encoding conversion, value_blob() might |
| 69687 | 69710 | ** need to call malloc() to expand the result of a zeroblob() |
| 69688 | 69711 | ** expression. |
| 69689 | 69712 | */ |
| 69690 | 69713 | columnMallocFailure(pStmt); |
| 69691 | 69714 | return val; |
| 69692 | 69715 | } |
| 69693 | | -SQLITE_API int sqlite3_column_bytes(sqlite3_stmt *pStmt, int i){ |
| 69716 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt *pStmt, int i){ |
| 69694 | 69717 | int val = sqlite3_value_bytes( columnMem(pStmt,i) ); |
| 69695 | 69718 | columnMallocFailure(pStmt); |
| 69696 | 69719 | return val; |
| 69697 | 69720 | } |
| 69698 | | -SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt *pStmt, int i){ |
| 69721 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt *pStmt, int i){ |
| 69699 | 69722 | int val = sqlite3_value_bytes16( columnMem(pStmt,i) ); |
| 69700 | 69723 | columnMallocFailure(pStmt); |
| 69701 | 69724 | return val; |
| 69702 | 69725 | } |
| 69703 | | -SQLITE_API double sqlite3_column_double(sqlite3_stmt *pStmt, int i){ |
| 69726 | +SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt *pStmt, int i){ |
| 69704 | 69727 | double val = sqlite3_value_double( columnMem(pStmt,i) ); |
| 69705 | 69728 | columnMallocFailure(pStmt); |
| 69706 | 69729 | return val; |
| 69707 | 69730 | } |
| 69708 | | -SQLITE_API int sqlite3_column_int(sqlite3_stmt *pStmt, int i){ |
| 69731 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt *pStmt, int i){ |
| 69709 | 69732 | int val = sqlite3_value_int( columnMem(pStmt,i) ); |
| 69710 | 69733 | columnMallocFailure(pStmt); |
| 69711 | 69734 | return val; |
| 69712 | 69735 | } |
| 69713 | | -SQLITE_API sqlite_int64 sqlite3_column_int64(sqlite3_stmt *pStmt, int i){ |
| 69736 | +SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt *pStmt, int i){ |
| 69714 | 69737 | sqlite_int64 val = sqlite3_value_int64( columnMem(pStmt,i) ); |
| 69715 | 69738 | columnMallocFailure(pStmt); |
| 69716 | 69739 | return val; |
| 69717 | 69740 | } |
| 69718 | | -SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt *pStmt, int i){ |
| 69741 | +SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt *pStmt, int i){ |
| 69719 | 69742 | const unsigned char *val = sqlite3_value_text( columnMem(pStmt,i) ); |
| 69720 | 69743 | columnMallocFailure(pStmt); |
| 69721 | 69744 | return val; |
| 69722 | 69745 | } |
| 69723 | | -SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt *pStmt, int i){ |
| 69746 | +SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt *pStmt, int i){ |
| 69724 | 69747 | Mem *pOut = columnMem(pStmt, i); |
| 69725 | 69748 | if( pOut->flags&MEM_Static ){ |
| 69726 | 69749 | pOut->flags &= ~MEM_Static; |
| 69727 | 69750 | pOut->flags |= MEM_Ephem; |
| 69728 | 69751 | } |
| 69729 | 69752 | columnMallocFailure(pStmt); |
| 69730 | 69753 | return (sqlite3_value *)pOut; |
| 69731 | 69754 | } |
| 69732 | 69755 | #ifndef SQLITE_OMIT_UTF16 |
| 69733 | | -SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt *pStmt, int i){ |
| 69756 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt *pStmt, int i){ |
| 69734 | 69757 | const void *val = sqlite3_value_text16( columnMem(pStmt,i) ); |
| 69735 | 69758 | columnMallocFailure(pStmt); |
| 69736 | 69759 | return val; |
| 69737 | 69760 | } |
| 69738 | 69761 | #endif /* SQLITE_OMIT_UTF16 */ |
| 69739 | | -SQLITE_API int sqlite3_column_type(sqlite3_stmt *pStmt, int i){ |
| 69762 | +SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt *pStmt, int i){ |
| 69740 | 69763 | int iType = sqlite3_value_type( columnMem(pStmt,i) ); |
| 69741 | 69764 | columnMallocFailure(pStmt); |
| 69742 | 69765 | return iType; |
| 69743 | 69766 | } |
| 69744 | 69767 | |
| | @@ -69798,16 +69821,16 @@ |
| 69798 | 69821 | |
| 69799 | 69822 | /* |
| 69800 | 69823 | ** Return the name of the Nth column of the result set returned by SQL |
| 69801 | 69824 | ** statement pStmt. |
| 69802 | 69825 | */ |
| 69803 | | -SQLITE_API const char *sqlite3_column_name(sqlite3_stmt *pStmt, int N){ |
| 69826 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt *pStmt, int N){ |
| 69804 | 69827 | return columnName( |
| 69805 | 69828 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_NAME); |
| 69806 | 69829 | } |
| 69807 | 69830 | #ifndef SQLITE_OMIT_UTF16 |
| 69808 | | -SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt *pStmt, int N){ |
| 69831 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt *pStmt, int N){ |
| 69809 | 69832 | return columnName( |
| 69810 | 69833 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_NAME); |
| 69811 | 69834 | } |
| 69812 | 69835 | #endif |
| 69813 | 69836 | |
| | @@ -69823,16 +69846,16 @@ |
| 69823 | 69846 | #ifndef SQLITE_OMIT_DECLTYPE |
| 69824 | 69847 | /* |
| 69825 | 69848 | ** Return the column declaration type (if applicable) of the 'i'th column |
| 69826 | 69849 | ** of the result set of SQL statement pStmt. |
| 69827 | 69850 | */ |
| 69828 | | -SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt *pStmt, int N){ |
| 69851 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt *pStmt, int N){ |
| 69829 | 69852 | return columnName( |
| 69830 | 69853 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DECLTYPE); |
| 69831 | 69854 | } |
| 69832 | 69855 | #ifndef SQLITE_OMIT_UTF16 |
| 69833 | | -SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt *pStmt, int N){ |
| 69856 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt *pStmt, int N){ |
| 69834 | 69857 | return columnName( |
| 69835 | 69858 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DECLTYPE); |
| 69836 | 69859 | } |
| 69837 | 69860 | #endif /* SQLITE_OMIT_UTF16 */ |
| 69838 | 69861 | #endif /* SQLITE_OMIT_DECLTYPE */ |
| | @@ -69841,16 +69864,16 @@ |
| 69841 | 69864 | /* |
| 69842 | 69865 | ** Return the name of the database from which a result column derives. |
| 69843 | 69866 | ** NULL is returned if the result column is an expression or constant or |
| 69844 | 69867 | ** anything else which is not an unambiguous reference to a database column. |
| 69845 | 69868 | */ |
| 69846 | | -SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt *pStmt, int N){ |
| 69869 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt *pStmt, int N){ |
| 69847 | 69870 | return columnName( |
| 69848 | 69871 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DATABASE); |
| 69849 | 69872 | } |
| 69850 | 69873 | #ifndef SQLITE_OMIT_UTF16 |
| 69851 | | -SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt *pStmt, int N){ |
| 69874 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt *pStmt, int N){ |
| 69852 | 69875 | return columnName( |
| 69853 | 69876 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DATABASE); |
| 69854 | 69877 | } |
| 69855 | 69878 | #endif /* SQLITE_OMIT_UTF16 */ |
| 69856 | 69879 | |
| | @@ -69857,16 +69880,16 @@ |
| 69857 | 69880 | /* |
| 69858 | 69881 | ** Return the name of the table from which a result column derives. |
| 69859 | 69882 | ** NULL is returned if the result column is an expression or constant or |
| 69860 | 69883 | ** anything else which is not an unambiguous reference to a database column. |
| 69861 | 69884 | */ |
| 69862 | | -SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt *pStmt, int N){ |
| 69885 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt *pStmt, int N){ |
| 69863 | 69886 | return columnName( |
| 69864 | 69887 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_TABLE); |
| 69865 | 69888 | } |
| 69866 | 69889 | #ifndef SQLITE_OMIT_UTF16 |
| 69867 | | -SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt *pStmt, int N){ |
| 69890 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt *pStmt, int N){ |
| 69868 | 69891 | return columnName( |
| 69869 | 69892 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_TABLE); |
| 69870 | 69893 | } |
| 69871 | 69894 | #endif /* SQLITE_OMIT_UTF16 */ |
| 69872 | 69895 | |
| | @@ -69873,16 +69896,16 @@ |
| 69873 | 69896 | /* |
| 69874 | 69897 | ** Return the name of the table column from which a result column derives. |
| 69875 | 69898 | ** NULL is returned if the result column is an expression or constant or |
| 69876 | 69899 | ** anything else which is not an unambiguous reference to a database column. |
| 69877 | 69900 | */ |
| 69878 | | -SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt *pStmt, int N){ |
| 69901 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt *pStmt, int N){ |
| 69879 | 69902 | return columnName( |
| 69880 | 69903 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_COLUMN); |
| 69881 | 69904 | } |
| 69882 | 69905 | #ifndef SQLITE_OMIT_UTF16 |
| 69883 | | -SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){ |
| 69906 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){ |
| 69884 | 69907 | return columnName( |
| 69885 | 69908 | pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_COLUMN); |
| 69886 | 69909 | } |
| 69887 | 69910 | #endif /* SQLITE_OMIT_UTF16 */ |
| 69888 | 69911 | #endif /* SQLITE_ENABLE_COLUMN_METADATA */ |
| | @@ -69979,20 +70002,20 @@ |
| 69979 | 70002 | |
| 69980 | 70003 | |
| 69981 | 70004 | /* |
| 69982 | 70005 | ** Bind a blob value to an SQL statement variable. |
| 69983 | 70006 | */ |
| 69984 | | -SQLITE_API int sqlite3_bind_blob( |
| 70007 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob( |
| 69985 | 70008 | sqlite3_stmt *pStmt, |
| 69986 | 70009 | int i, |
| 69987 | 70010 | const void *zData, |
| 69988 | 70011 | int nData, |
| 69989 | 70012 | void (*xDel)(void*) |
| 69990 | 70013 | ){ |
| 69991 | 70014 | return bindText(pStmt, i, zData, nData, xDel, 0); |
| 69992 | 70015 | } |
| 69993 | | -SQLITE_API int sqlite3_bind_blob64( |
| 70016 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64( |
| 69994 | 70017 | sqlite3_stmt *pStmt, |
| 69995 | 70018 | int i, |
| 69996 | 70019 | const void *zData, |
| 69997 | 70020 | sqlite3_uint64 nData, |
| 69998 | 70021 | void (*xDel)(void*) |
| | @@ -70002,52 +70025,52 @@ |
| 70002 | 70025 | return invokeValueDestructor(zData, xDel, 0); |
| 70003 | 70026 | }else{ |
| 70004 | 70027 | return bindText(pStmt, i, zData, (int)nData, xDel, 0); |
| 70005 | 70028 | } |
| 70006 | 70029 | } |
| 70007 | | -SQLITE_API int sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){ |
| 70030 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){ |
| 70008 | 70031 | int rc; |
| 70009 | 70032 | Vdbe *p = (Vdbe *)pStmt; |
| 70010 | 70033 | rc = vdbeUnbind(p, i); |
| 70011 | 70034 | if( rc==SQLITE_OK ){ |
| 70012 | 70035 | sqlite3VdbeMemSetDouble(&p->aVar[i-1], rValue); |
| 70013 | 70036 | sqlite3_mutex_leave(p->db->mutex); |
| 70014 | 70037 | } |
| 70015 | 70038 | return rc; |
| 70016 | 70039 | } |
| 70017 | | -SQLITE_API int sqlite3_bind_int(sqlite3_stmt *p, int i, int iValue){ |
| 70040 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt *p, int i, int iValue){ |
| 70018 | 70041 | return sqlite3_bind_int64(p, i, (i64)iValue); |
| 70019 | 70042 | } |
| 70020 | | -SQLITE_API int sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){ |
| 70043 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){ |
| 70021 | 70044 | int rc; |
| 70022 | 70045 | Vdbe *p = (Vdbe *)pStmt; |
| 70023 | 70046 | rc = vdbeUnbind(p, i); |
| 70024 | 70047 | if( rc==SQLITE_OK ){ |
| 70025 | 70048 | sqlite3VdbeMemSetInt64(&p->aVar[i-1], iValue); |
| 70026 | 70049 | sqlite3_mutex_leave(p->db->mutex); |
| 70027 | 70050 | } |
| 70028 | 70051 | return rc; |
| 70029 | 70052 | } |
| 70030 | | -SQLITE_API int sqlite3_bind_null(sqlite3_stmt *pStmt, int i){ |
| 70053 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt *pStmt, int i){ |
| 70031 | 70054 | int rc; |
| 70032 | 70055 | Vdbe *p = (Vdbe*)pStmt; |
| 70033 | 70056 | rc = vdbeUnbind(p, i); |
| 70034 | 70057 | if( rc==SQLITE_OK ){ |
| 70035 | 70058 | sqlite3_mutex_leave(p->db->mutex); |
| 70036 | 70059 | } |
| 70037 | 70060 | return rc; |
| 70038 | 70061 | } |
| 70039 | | -SQLITE_API int sqlite3_bind_text( |
| 70062 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_text( |
| 70040 | 70063 | sqlite3_stmt *pStmt, |
| 70041 | 70064 | int i, |
| 70042 | 70065 | const char *zData, |
| 70043 | 70066 | int nData, |
| 70044 | 70067 | void (*xDel)(void*) |
| 70045 | 70068 | ){ |
| 70046 | 70069 | return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF8); |
| 70047 | 70070 | } |
| 70048 | | -SQLITE_API int sqlite3_bind_text64( |
| 70071 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64( |
| 70049 | 70072 | sqlite3_stmt *pStmt, |
| 70050 | 70073 | int i, |
| 70051 | 70074 | const char *zData, |
| 70052 | 70075 | sqlite3_uint64 nData, |
| 70053 | 70076 | void (*xDel)(void*), |
| | @@ -70060,21 +70083,21 @@ |
| 70060 | 70083 | if( enc==SQLITE_UTF16 ) enc = SQLITE_UTF16NATIVE; |
| 70061 | 70084 | return bindText(pStmt, i, zData, (int)nData, xDel, enc); |
| 70062 | 70085 | } |
| 70063 | 70086 | } |
| 70064 | 70087 | #ifndef SQLITE_OMIT_UTF16 |
| 70065 | | -SQLITE_API int sqlite3_bind_text16( |
| 70088 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16( |
| 70066 | 70089 | sqlite3_stmt *pStmt, |
| 70067 | 70090 | int i, |
| 70068 | 70091 | const void *zData, |
| 70069 | 70092 | int nData, |
| 70070 | 70093 | void (*xDel)(void*) |
| 70071 | 70094 | ){ |
| 70072 | 70095 | return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF16NATIVE); |
| 70073 | 70096 | } |
| 70074 | 70097 | #endif /* SQLITE_OMIT_UTF16 */ |
| 70075 | | -SQLITE_API int sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){ |
| 70098 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){ |
| 70076 | 70099 | int rc; |
| 70077 | 70100 | switch( sqlite3_value_type((sqlite3_value*)pValue) ){ |
| 70078 | 70101 | case SQLITE_INTEGER: { |
| 70079 | 70102 | rc = sqlite3_bind_int64(pStmt, i, pValue->u.i); |
| 70080 | 70103 | break; |
| | @@ -70101,11 +70124,11 @@ |
| 70101 | 70124 | break; |
| 70102 | 70125 | } |
| 70103 | 70126 | } |
| 70104 | 70127 | return rc; |
| 70105 | 70128 | } |
| 70106 | | -SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){ |
| 70129 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){ |
| 70107 | 70130 | int rc; |
| 70108 | 70131 | Vdbe *p = (Vdbe *)pStmt; |
| 70109 | 70132 | rc = vdbeUnbind(p, i); |
| 70110 | 70133 | if( rc==SQLITE_OK ){ |
| 70111 | 70134 | sqlite3VdbeMemSetZeroBlob(&p->aVar[i-1], n); |
| | @@ -70116,11 +70139,11 @@ |
| 70116 | 70139 | |
| 70117 | 70140 | /* |
| 70118 | 70141 | ** Return the number of wildcards that can be potentially bound to. |
| 70119 | 70142 | ** This routine is added to support DBD::SQLite. |
| 70120 | 70143 | */ |
| 70121 | | -SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){ |
| 70144 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){ |
| 70122 | 70145 | Vdbe *p = (Vdbe*)pStmt; |
| 70123 | 70146 | return p ? p->nVar : 0; |
| 70124 | 70147 | } |
| 70125 | 70148 | |
| 70126 | 70149 | /* |
| | @@ -70127,11 +70150,11 @@ |
| 70127 | 70150 | ** Return the name of a wildcard parameter. Return NULL if the index |
| 70128 | 70151 | ** is out of range or if the wildcard is unnamed. |
| 70129 | 70152 | ** |
| 70130 | 70153 | ** The result is always UTF-8. |
| 70131 | 70154 | */ |
| 70132 | | -SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt *pStmt, int i){ |
| 70155 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt *pStmt, int i){ |
| 70133 | 70156 | Vdbe *p = (Vdbe*)pStmt; |
| 70134 | 70157 | if( p==0 || i<1 || i>p->nzVar ){ |
| 70135 | 70158 | return 0; |
| 70136 | 70159 | } |
| 70137 | 70160 | return p->azVar[i-1]; |
| | @@ -70155,11 +70178,11 @@ |
| 70155 | 70178 | } |
| 70156 | 70179 | } |
| 70157 | 70180 | } |
| 70158 | 70181 | return 0; |
| 70159 | 70182 | } |
| 70160 | | -SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){ |
| 70183 | +SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){ |
| 70161 | 70184 | return sqlite3VdbeParameterIndex((Vdbe*)pStmt, zName, sqlite3Strlen30(zName)); |
| 70162 | 70185 | } |
| 70163 | 70186 | |
| 70164 | 70187 | /* |
| 70165 | 70188 | ** Transfer all bindings from the first statement over to the second. |
| | @@ -70189,11 +70212,11 @@ |
| 70189 | 70212 | ** |
| 70190 | 70213 | ** If the two statements contain a different number of bindings, then |
| 70191 | 70214 | ** an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise |
| 70192 | 70215 | ** SQLITE_OK is returned. |
| 70193 | 70216 | */ |
| 70194 | | -SQLITE_API int sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){ |
| 70217 | +SQLITE_API int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){ |
| 70195 | 70218 | Vdbe *pFrom = (Vdbe*)pFromStmt; |
| 70196 | 70219 | Vdbe *pTo = (Vdbe*)pToStmt; |
| 70197 | 70220 | if( pFrom->nVar!=pTo->nVar ){ |
| 70198 | 70221 | return SQLITE_ERROR; |
| 70199 | 70222 | } |
| | @@ -70211,26 +70234,26 @@ |
| 70211 | 70234 | ** Return the sqlite3* database handle to which the prepared statement given |
| 70212 | 70235 | ** in the argument belongs. This is the same database handle that was |
| 70213 | 70236 | ** the first argument to the sqlite3_prepare() that was used to create |
| 70214 | 70237 | ** the statement in the first place. |
| 70215 | 70238 | */ |
| 70216 | | -SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt *pStmt){ |
| 70239 | +SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt *pStmt){ |
| 70217 | 70240 | return pStmt ? ((Vdbe*)pStmt)->db : 0; |
| 70218 | 70241 | } |
| 70219 | 70242 | |
| 70220 | 70243 | /* |
| 70221 | 70244 | ** Return true if the prepared statement is guaranteed to not modify the |
| 70222 | 70245 | ** database. |
| 70223 | 70246 | */ |
| 70224 | | -SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt){ |
| 70247 | +SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt){ |
| 70225 | 70248 | return pStmt ? ((Vdbe*)pStmt)->readOnly : 1; |
| 70226 | 70249 | } |
| 70227 | 70250 | |
| 70228 | 70251 | /* |
| 70229 | 70252 | ** Return true if the prepared statement is in need of being reset. |
| 70230 | 70253 | */ |
| 70231 | | -SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt *pStmt){ |
| 70254 | +SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt *pStmt){ |
| 70232 | 70255 | Vdbe *v = (Vdbe*)pStmt; |
| 70233 | 70256 | return v!=0 && v->pc>=0 && v->magic==VDBE_MAGIC_RUN; |
| 70234 | 70257 | } |
| 70235 | 70258 | |
| 70236 | 70259 | /* |
| | @@ -70237,11 +70260,11 @@ |
| 70237 | 70260 | ** Return a pointer to the next prepared statement after pStmt associated |
| 70238 | 70261 | ** with database connection pDb. If pStmt is NULL, return the first |
| 70239 | 70262 | ** prepared statement for the database connection. Return NULL if there |
| 70240 | 70263 | ** are no more. |
| 70241 | 70264 | */ |
| 70242 | | -SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){ |
| 70265 | +SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){ |
| 70243 | 70266 | sqlite3_stmt *pNext; |
| 70244 | 70267 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 70245 | 70268 | if( !sqlite3SafetyCheckOk(pDb) ){ |
| 70246 | 70269 | (void)SQLITE_MISUSE_BKPT; |
| 70247 | 70270 | return 0; |
| | @@ -70258,11 +70281,11 @@ |
| 70258 | 70281 | } |
| 70259 | 70282 | |
| 70260 | 70283 | /* |
| 70261 | 70284 | ** Return the value of a status counter for a prepared statement |
| 70262 | 70285 | */ |
| 70263 | | -SQLITE_API int sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){ |
| 70286 | +SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){ |
| 70264 | 70287 | Vdbe *pVdbe = (Vdbe*)pStmt; |
| 70265 | 70288 | u32 v; |
| 70266 | 70289 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 70267 | 70290 | if( !pStmt ){ |
| 70268 | 70291 | (void)SQLITE_MISUSE_BKPT; |
| | @@ -70276,11 +70299,11 @@ |
| 70276 | 70299 | |
| 70277 | 70300 | #ifdef SQLITE_ENABLE_STMT_SCANSTATUS |
| 70278 | 70301 | /* |
| 70279 | 70302 | ** Return status data for a single loop within query pStmt. |
| 70280 | 70303 | */ |
| 70281 | | -SQLITE_API int sqlite3_stmt_scanstatus( |
| 70304 | +SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus( |
| 70282 | 70305 | sqlite3_stmt *pStmt, /* Prepared statement being queried */ |
| 70283 | 70306 | int idx, /* Index of loop to report on */ |
| 70284 | 70307 | int iScanStatusOp, /* Which metric to return */ |
| 70285 | 70308 | void *pOut /* OUT: Write the answer here */ |
| 70286 | 70309 | ){ |
| | @@ -70335,11 +70358,11 @@ |
| 70335 | 70358 | } |
| 70336 | 70359 | |
| 70337 | 70360 | /* |
| 70338 | 70361 | ** Zero all counters associated with the sqlite3_stmt_scanstatus() data. |
| 70339 | 70362 | */ |
| 70340 | | -SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){ |
| 70363 | +SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){ |
| 70341 | 70364 | Vdbe *p = (Vdbe*)pStmt; |
| 70342 | 70365 | memset(p->anExec, 0, p->nOp * sizeof(i64)); |
| 70343 | 70366 | } |
| 70344 | 70367 | #endif /* SQLITE_ENABLE_STMT_SCANSTATUS */ |
| 70345 | 70368 | |
| | @@ -70834,11 +70857,11 @@ |
| 70834 | 70857 | ** Try to convert the type of a function argument or a result column |
| 70835 | 70858 | ** into a numeric representation. Use either INTEGER or REAL whichever |
| 70836 | 70859 | ** is appropriate. But only do the conversion if it is possible without |
| 70837 | 70860 | ** loss of information and return the revised type of the argument. |
| 70838 | 70861 | */ |
| 70839 | | -SQLITE_API int sqlite3_value_numeric_type(sqlite3_value *pVal){ |
| 70862 | +SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value *pVal){ |
| 70840 | 70863 | int eType = sqlite3_value_type(pVal); |
| 70841 | 70864 | if( eType==SQLITE_TEXT ){ |
| 70842 | 70865 | Mem *pMem = (Mem*)pVal; |
| 70843 | 70866 | applyNumericAffinity(pMem, 0); |
| 70844 | 70867 | eType = sqlite3_value_type(pVal); |
| | @@ -77296,11 +77319,11 @@ |
| 77296 | 77319 | } |
| 77297 | 77320 | |
| 77298 | 77321 | /* |
| 77299 | 77322 | ** Open a blob handle. |
| 77300 | 77323 | */ |
| 77301 | | -SQLITE_API int sqlite3_blob_open( |
| 77324 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_open( |
| 77302 | 77325 | sqlite3* db, /* The database connection */ |
| 77303 | 77326 | const char *zDb, /* The attached database containing the blob */ |
| 77304 | 77327 | const char *zTable, /* The table containing the blob */ |
| 77305 | 77328 | const char *zColumn, /* The column containing the blob */ |
| 77306 | 77329 | sqlite_int64 iRow, /* The row containing the glob */ |
| | @@ -77533,11 +77556,11 @@ |
| 77533 | 77556 | |
| 77534 | 77557 | /* |
| 77535 | 77558 | ** Close a blob handle that was previously created using |
| 77536 | 77559 | ** sqlite3_blob_open(). |
| 77537 | 77560 | */ |
| 77538 | | -SQLITE_API int sqlite3_blob_close(sqlite3_blob *pBlob){ |
| 77561 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *pBlob){ |
| 77539 | 77562 | Incrblob *p = (Incrblob *)pBlob; |
| 77540 | 77563 | int rc; |
| 77541 | 77564 | sqlite3 *db; |
| 77542 | 77565 | |
| 77543 | 77566 | if( p ){ |
| | @@ -77602,28 +77625,28 @@ |
| 77602 | 77625 | } |
| 77603 | 77626 | |
| 77604 | 77627 | /* |
| 77605 | 77628 | ** Read data from a blob handle. |
| 77606 | 77629 | */ |
| 77607 | | -SQLITE_API int sqlite3_blob_read(sqlite3_blob *pBlob, void *z, int n, int iOffset){ |
| 77630 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *pBlob, void *z, int n, int iOffset){ |
| 77608 | 77631 | return blobReadWrite(pBlob, z, n, iOffset, sqlite3BtreeData); |
| 77609 | 77632 | } |
| 77610 | 77633 | |
| 77611 | 77634 | /* |
| 77612 | 77635 | ** Write data to a blob handle. |
| 77613 | 77636 | */ |
| 77614 | | -SQLITE_API int sqlite3_blob_write(sqlite3_blob *pBlob, const void *z, int n, int iOffset){ |
| 77637 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *pBlob, const void *z, int n, int iOffset){ |
| 77615 | 77638 | return blobReadWrite(pBlob, (void *)z, n, iOffset, sqlite3BtreePutData); |
| 77616 | 77639 | } |
| 77617 | 77640 | |
| 77618 | 77641 | /* |
| 77619 | 77642 | ** Query a blob handle for the size of the data. |
| 77620 | 77643 | ** |
| 77621 | 77644 | ** The Incrblob.nByte field is fixed for the lifetime of the Incrblob |
| 77622 | 77645 | ** so no mutex is required for access. |
| 77623 | 77646 | */ |
| 77624 | | -SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *pBlob){ |
| 77647 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *pBlob){ |
| 77625 | 77648 | Incrblob *p = (Incrblob *)pBlob; |
| 77626 | 77649 | return (p && p->pStmt) ? p->nByte : 0; |
| 77627 | 77650 | } |
| 77628 | 77651 | |
| 77629 | 77652 | /* |
| | @@ -77634,11 +77657,11 @@ |
| 77634 | 77657 | ** contain a blob or text value, then an error code is returned and the |
| 77635 | 77658 | ** database handle error code and message set. If this happens, then all |
| 77636 | 77659 | ** subsequent calls to sqlite3_blob_xxx() functions (except blob_close()) |
| 77637 | 77660 | ** immediately return SQLITE_ABORT. |
| 77638 | 77661 | */ |
| 77639 | | -SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){ |
| 77662 | +SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){ |
| 77640 | 77663 | int rc; |
| 77641 | 77664 | Incrblob *p = (Incrblob *)pBlob; |
| 77642 | 77665 | sqlite3 *db; |
| 77643 | 77666 | |
| 77644 | 77667 | if( p==0 ) return SQLITE_MISUSE_BKPT; |
| | @@ -90142,11 +90165,11 @@ |
| 90142 | 90165 | ** and attempts to write the column will be ignored. |
| 90143 | 90166 | ** |
| 90144 | 90167 | ** Setting the auth function to NULL disables this hook. The default |
| 90145 | 90168 | ** setting of the auth function is NULL. |
| 90146 | 90169 | */ |
| 90147 | | -SQLITE_API int sqlite3_set_authorizer( |
| 90170 | +SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer( |
| 90148 | 90171 | sqlite3 *db, |
| 90149 | 90172 | int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), |
| 90150 | 90173 | void *pArg |
| 90151 | 90174 | ){ |
| 90152 | 90175 | #ifdef SQLITE_ENABLE_API_ARMOR |
| | @@ -96720,11 +96743,11 @@ |
| 96720 | 96743 | } |
| 96721 | 96744 | |
| 96722 | 96745 | /* |
| 96723 | 96746 | ** The sqlite3_strglob() interface. |
| 96724 | 96747 | */ |
| 96725 | | -SQLITE_API int sqlite3_strglob(const char *zGlobPattern, const char *zString){ |
| 96748 | +SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlobPattern, const char *zString){ |
| 96726 | 96749 | return patternCompare((u8*)zGlobPattern, (u8*)zString, &globInfo, 0)==0; |
| 96727 | 96750 | } |
| 96728 | 96751 | |
| 96729 | 96752 | /* |
| 96730 | 96753 | ** Count the number of times that the LIKE operator (or GLOB which is |
| | @@ -101215,11 +101238,11 @@ |
| 101215 | 101238 | ** If the SQL is a query, then for each row in the query result |
| 101216 | 101239 | ** the xCallback() function is called. pArg becomes the first |
| 101217 | 101240 | ** argument to xCallback(). If xCallback=NULL then no callback |
| 101218 | 101241 | ** is invoked, even for queries. |
| 101219 | 101242 | */ |
| 101220 | | -SQLITE_API int sqlite3_exec( |
| 101243 | +SQLITE_API int SQLITE_STDCALL sqlite3_exec( |
| 101221 | 101244 | sqlite3 *db, /* The database on which the SQL executes */ |
| 101222 | 101245 | const char *zSql, /* The SQL to be executed */ |
| 101223 | 101246 | sqlite3_callback xCallback, /* Invoke this callback routine */ |
| 101224 | 101247 | void *pArg, /* First argument to xCallback() */ |
| 101225 | 101248 | char **pzErrMsg /* Write error messages here */ |
| | @@ -102410,11 +102433,11 @@ |
| 102410 | 102433 | db->aExtension = aHandle; |
| 102411 | 102434 | |
| 102412 | 102435 | db->aExtension[db->nExtension++] = handle; |
| 102413 | 102436 | return SQLITE_OK; |
| 102414 | 102437 | } |
| 102415 | | -SQLITE_API int sqlite3_load_extension( |
| 102438 | +SQLITE_API int SQLITE_STDCALL sqlite3_load_extension( |
| 102416 | 102439 | sqlite3 *db, /* Load the extension into this database connection */ |
| 102417 | 102440 | const char *zFile, /* Name of the shared library containing extension */ |
| 102418 | 102441 | const char *zProc, /* Entry point. Use "sqlite3_extension_init" if 0 */ |
| 102419 | 102442 | char **pzErrMsg /* Put error message here if not 0 */ |
| 102420 | 102443 | ){ |
| | @@ -102441,11 +102464,11 @@ |
| 102441 | 102464 | |
| 102442 | 102465 | /* |
| 102443 | 102466 | ** Enable or disable extension loading. Extension loading is disabled by |
| 102444 | 102467 | ** default so as not to open security holes in older applications. |
| 102445 | 102468 | */ |
| 102446 | | -SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff){ |
| 102469 | +SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff){ |
| 102447 | 102470 | sqlite3_mutex_enter(db->mutex); |
| 102448 | 102471 | if( onoff ){ |
| 102449 | 102472 | db->flags |= SQLITE_LoadExtension; |
| 102450 | 102473 | }else{ |
| 102451 | 102474 | db->flags &= ~SQLITE_LoadExtension; |
| | @@ -102498,11 +102521,11 @@ |
| 102498 | 102521 | |
| 102499 | 102522 | /* |
| 102500 | 102523 | ** Register a statically linked extension that is automatically |
| 102501 | 102524 | ** loaded by every new database connection. |
| 102502 | 102525 | */ |
| 102503 | | -SQLITE_API int sqlite3_auto_extension(void (*xInit)(void)){ |
| 102526 | +SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void (*xInit)(void)){ |
| 102504 | 102527 | int rc = SQLITE_OK; |
| 102505 | 102528 | #ifndef SQLITE_OMIT_AUTOINIT |
| 102506 | 102529 | rc = sqlite3_initialize(); |
| 102507 | 102530 | if( rc ){ |
| 102508 | 102531 | return rc; |
| | @@ -102543,11 +102566,11 @@ |
| 102543 | 102566 | ** routine is a no-op. |
| 102544 | 102567 | ** |
| 102545 | 102568 | ** Return 1 if xInit was found on the list and removed. Return 0 if xInit |
| 102546 | 102569 | ** was not on the list. |
| 102547 | 102570 | */ |
| 102548 | | -SQLITE_API int sqlite3_cancel_auto_extension(void (*xInit)(void)){ |
| 102571 | +SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void (*xInit)(void)){ |
| 102549 | 102572 | #if SQLITE_THREADSAFE |
| 102550 | 102573 | sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); |
| 102551 | 102574 | #endif |
| 102552 | 102575 | int i; |
| 102553 | 102576 | int n = 0; |
| | @@ -102566,11 +102589,11 @@ |
| 102566 | 102589 | } |
| 102567 | 102590 | |
| 102568 | 102591 | /* |
| 102569 | 102592 | ** Reset the automatic extension loading mechanism. |
| 102570 | 102593 | */ |
| 102571 | | -SQLITE_API void sqlite3_reset_auto_extension(void){ |
| 102594 | +SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void){ |
| 102572 | 102595 | #ifndef SQLITE_OMIT_AUTOINIT |
| 102573 | 102596 | if( sqlite3_initialize()==SQLITE_OK ) |
| 102574 | 102597 | #endif |
| 102575 | 102598 | { |
| 102576 | 102599 | #if SQLITE_THREADSAFE |
| | @@ -105846,11 +105869,11 @@ |
| 105846 | 105869 | ** and so if a schema change occurs, SQLITE_SCHEMA is returned by |
| 105847 | 105870 | ** sqlite3_step(). In the new version, the original SQL text is retained |
| 105848 | 105871 | ** and the statement is automatically recompiled if an schema change |
| 105849 | 105872 | ** occurs. |
| 105850 | 105873 | */ |
| 105851 | | -SQLITE_API int sqlite3_prepare( |
| 105874 | +SQLITE_API int SQLITE_STDCALL sqlite3_prepare( |
| 105852 | 105875 | sqlite3 *db, /* Database handle. */ |
| 105853 | 105876 | const char *zSql, /* UTF-8 encoded SQL statement. */ |
| 105854 | 105877 | int nBytes, /* Length of zSql in bytes. */ |
| 105855 | 105878 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 105856 | 105879 | const char **pzTail /* OUT: End of parsed string */ |
| | @@ -105858,11 +105881,11 @@ |
| 105858 | 105881 | int rc; |
| 105859 | 105882 | rc = sqlite3LockAndPrepare(db,zSql,nBytes,0,0,ppStmt,pzTail); |
| 105860 | 105883 | assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */ |
| 105861 | 105884 | return rc; |
| 105862 | 105885 | } |
| 105863 | | -SQLITE_API int sqlite3_prepare_v2( |
| 105886 | +SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2( |
| 105864 | 105887 | sqlite3 *db, /* Database handle. */ |
| 105865 | 105888 | const char *zSql, /* UTF-8 encoded SQL statement. */ |
| 105866 | 105889 | int nBytes, /* Length of zSql in bytes. */ |
| 105867 | 105890 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 105868 | 105891 | const char **pzTail /* OUT: End of parsed string */ |
| | @@ -105934,11 +105957,11 @@ |
| 105934 | 105957 | ** and so if a schema change occurs, SQLITE_SCHEMA is returned by |
| 105935 | 105958 | ** sqlite3_step(). In the new version, the original SQL text is retained |
| 105936 | 105959 | ** and the statement is automatically recompiled if an schema change |
| 105937 | 105960 | ** occurs. |
| 105938 | 105961 | */ |
| 105939 | | -SQLITE_API int sqlite3_prepare16( |
| 105962 | +SQLITE_API int SQLITE_STDCALL sqlite3_prepare16( |
| 105940 | 105963 | sqlite3 *db, /* Database handle. */ |
| 105941 | 105964 | const void *zSql, /* UTF-16 encoded SQL statement. */ |
| 105942 | 105965 | int nBytes, /* Length of zSql in bytes. */ |
| 105943 | 105966 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 105944 | 105967 | const void **pzTail /* OUT: End of parsed string */ |
| | @@ -105946,11 +105969,11 @@ |
| 105946 | 105969 | int rc; |
| 105947 | 105970 | rc = sqlite3Prepare16(db,zSql,nBytes,0,ppStmt,pzTail); |
| 105948 | 105971 | assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */ |
| 105949 | 105972 | return rc; |
| 105950 | 105973 | } |
| 105951 | | -SQLITE_API int sqlite3_prepare16_v2( |
| 105974 | +SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2( |
| 105952 | 105975 | sqlite3 *db, /* Database handle. */ |
| 105953 | 105976 | const void *zSql, /* UTF-16 encoded SQL statement. */ |
| 105954 | 105977 | int nBytes, /* Length of zSql in bytes. */ |
| 105955 | 105978 | sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */ |
| 105956 | 105979 | const void **pzTail /* OUT: End of parsed string */ |
| | @@ -111682,11 +111705,11 @@ |
| 111682 | 111705 | ** The result that is written to ***pazResult is held in memory obtained |
| 111683 | 111706 | ** from malloc(). But the caller cannot free this memory directly. |
| 111684 | 111707 | ** Instead, the entire table should be passed to sqlite3_free_table() when |
| 111685 | 111708 | ** the calling procedure is finished using it. |
| 111686 | 111709 | */ |
| 111687 | | -SQLITE_API int sqlite3_get_table( |
| 111710 | +SQLITE_API int SQLITE_STDCALL sqlite3_get_table( |
| 111688 | 111711 | sqlite3 *db, /* The database on which the SQL executes */ |
| 111689 | 111712 | const char *zSql, /* The SQL to be executed */ |
| 111690 | 111713 | char ***pazResult, /* Write the result table here */ |
| 111691 | 111714 | int *pnRow, /* Write the number of rows in the result here */ |
| 111692 | 111715 | int *pnColumn, /* Write the number of columns of result here */ |
| | @@ -111751,11 +111774,11 @@ |
| 111751 | 111774 | } |
| 111752 | 111775 | |
| 111753 | 111776 | /* |
| 111754 | 111777 | ** This routine frees the space the sqlite3_get_table() malloced. |
| 111755 | 111778 | */ |
| 111756 | | -SQLITE_API void sqlite3_free_table( |
| 111779 | +SQLITE_API void SQLITE_STDCALL sqlite3_free_table( |
| 111757 | 111780 | char **azResult /* Result returned from sqlite3_get_table() */ |
| 111758 | 111781 | ){ |
| 111759 | 111782 | if( azResult ){ |
| 111760 | 111783 | int i, n; |
| 111761 | 111784 | azResult--; |
| | @@ -114111,11 +114134,11 @@ |
| 114111 | 114134 | |
| 114112 | 114135 | |
| 114113 | 114136 | /* |
| 114114 | 114137 | ** External API function used to create a new virtual-table module. |
| 114115 | 114138 | */ |
| 114116 | | -SQLITE_API int sqlite3_create_module( |
| 114139 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_module( |
| 114117 | 114140 | sqlite3 *db, /* Database in which module is registered */ |
| 114118 | 114141 | const char *zName, /* Name assigned to this module */ |
| 114119 | 114142 | const sqlite3_module *pModule, /* The definition of the module */ |
| 114120 | 114143 | void *pAux /* Context pointer for xCreate/xConnect */ |
| 114121 | 114144 | ){ |
| | @@ -114126,11 +114149,11 @@ |
| 114126 | 114149 | } |
| 114127 | 114150 | |
| 114128 | 114151 | /* |
| 114129 | 114152 | ** External API function used to create a new virtual-table module. |
| 114130 | 114153 | */ |
| 114131 | | -SQLITE_API int sqlite3_create_module_v2( |
| 114154 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2( |
| 114132 | 114155 | sqlite3 *db, /* Database in which module is registered */ |
| 114133 | 114156 | const char *zName, /* Name assigned to this module */ |
| 114134 | 114157 | const sqlite3_module *pModule, /* The definition of the module */ |
| 114135 | 114158 | void *pAux, /* Context pointer for xCreate/xConnect */ |
| 114136 | 114159 | void (*xDestroy)(void *) /* Module destructor function */ |
| | @@ -114741,11 +114764,11 @@ |
| 114741 | 114764 | /* |
| 114742 | 114765 | ** This function is used to set the schema of a virtual table. It is only |
| 114743 | 114766 | ** valid to call this function from within the xCreate() or xConnect() of a |
| 114744 | 114767 | ** virtual table module. |
| 114745 | 114768 | */ |
| 114746 | | -SQLITE_API int sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){ |
| 114769 | +SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){ |
| 114747 | 114770 | Parse *pParse; |
| 114748 | 114771 | |
| 114749 | 114772 | int rc = SQLITE_OK; |
| 114750 | 114773 | Table *pTab; |
| 114751 | 114774 | char *zErr = 0; |
| | @@ -115109,11 +115132,11 @@ |
| 115109 | 115132 | ** table update operation currently in progress. |
| 115110 | 115133 | ** |
| 115111 | 115134 | ** The results of this routine are undefined unless it is called from |
| 115112 | 115135 | ** within an xUpdate method. |
| 115113 | 115136 | */ |
| 115114 | | -SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *db){ |
| 115137 | +SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *db){ |
| 115115 | 115138 | static const unsigned char aMap[] = { |
| 115116 | 115139 | SQLITE_ROLLBACK, SQLITE_ABORT, SQLITE_FAIL, SQLITE_IGNORE, SQLITE_REPLACE |
| 115117 | 115140 | }; |
| 115118 | 115141 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 115119 | 115142 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| | @@ -115127,11 +115150,11 @@ |
| 115127 | 115150 | /* |
| 115128 | 115151 | ** Call from within the xCreate() or xConnect() methods to provide |
| 115129 | 115152 | ** the SQLite core with additional information about the behavior |
| 115130 | 115153 | ** of the virtual table being implemented. |
| 115131 | 115154 | */ |
| 115132 | | -SQLITE_API int sqlite3_vtab_config(sqlite3 *db, int op, ...){ |
| 115155 | +SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3 *db, int op, ...){ |
| 115133 | 115156 | va_list ap; |
| 115134 | 115157 | int rc = SQLITE_OK; |
| 115135 | 115158 | |
| 115136 | 115159 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 115137 | 115160 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| | @@ -127161,11 +127184,11 @@ |
| 127161 | 127184 | ** |
| 127162 | 127185 | ** If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed |
| 127163 | 127186 | ** to recognize the end of a trigger can be omitted. All we have to do |
| 127164 | 127187 | ** is look for a semicolon that is not part of an string or comment. |
| 127165 | 127188 | */ |
| 127166 | | -SQLITE_API int sqlite3_complete(const char *zSql){ |
| 127189 | +SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *zSql){ |
| 127167 | 127190 | u8 state = 0; /* Current state, using numbers defined in header comment */ |
| 127168 | 127191 | u8 token; /* Value of the next token */ |
| 127169 | 127192 | |
| 127170 | 127193 | #ifndef SQLITE_OMIT_TRIGGER |
| 127171 | 127194 | /* A complex statement machine used to detect the end of a CREATE TRIGGER |
| | @@ -127326,11 +127349,11 @@ |
| 127326 | 127349 | /* |
| 127327 | 127350 | ** This routine is the same as the sqlite3_complete() routine described |
| 127328 | 127351 | ** above, except that the parameter is required to be UTF-16 encoded, not |
| 127329 | 127352 | ** UTF-8. |
| 127330 | 127353 | */ |
| 127331 | | -SQLITE_API int sqlite3_complete16(const void *zSql){ |
| 127354 | +SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *zSql){ |
| 127332 | 127355 | sqlite3_value *pVal; |
| 127333 | 127356 | char const *zSql8; |
| 127334 | 127357 | int rc = SQLITE_NOMEM; |
| 127335 | 127358 | |
| 127336 | 127359 | #ifndef SQLITE_OMIT_AUTOINIT |
| | @@ -127476,37 +127499,37 @@ |
| 127476 | 127499 | #endif |
| 127477 | 127500 | |
| 127478 | 127501 | /* IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns |
| 127479 | 127502 | ** a pointer to the to the sqlite3_version[] string constant. |
| 127480 | 127503 | */ |
| 127481 | | -SQLITE_API const char *sqlite3_libversion(void){ return sqlite3_version; } |
| 127504 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void){ return sqlite3_version; } |
| 127482 | 127505 | |
| 127483 | 127506 | /* IMPLEMENTATION-OF: R-63124-39300 The sqlite3_sourceid() function returns a |
| 127484 | 127507 | ** pointer to a string constant whose value is the same as the |
| 127485 | 127508 | ** SQLITE_SOURCE_ID C preprocessor macro. |
| 127486 | 127509 | */ |
| 127487 | | -SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; } |
| 127510 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; } |
| 127488 | 127511 | |
| 127489 | 127512 | /* IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function |
| 127490 | 127513 | ** returns an integer equal to SQLITE_VERSION_NUMBER. |
| 127491 | 127514 | */ |
| 127492 | | -SQLITE_API int sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; } |
| 127515 | +SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; } |
| 127493 | 127516 | |
| 127494 | 127517 | /* IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns |
| 127495 | 127518 | ** zero if and only if SQLite was compiled with mutexing code omitted due to |
| 127496 | 127519 | ** the SQLITE_THREADSAFE compile-time option being set to 0. |
| 127497 | 127520 | */ |
| 127498 | | -SQLITE_API int sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; } |
| 127521 | +SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; } |
| 127499 | 127522 | |
| 127500 | 127523 | #if !defined(SQLITE_OMIT_TRACE) && defined(SQLITE_ENABLE_IOTRACE) |
| 127501 | 127524 | /* |
| 127502 | 127525 | ** If the following function pointer is not NULL and if |
| 127503 | 127526 | ** SQLITE_ENABLE_IOTRACE is enabled, then messages describing |
| 127504 | 127527 | ** I/O active are written using this function. These messages |
| 127505 | 127528 | ** are intended for debugging activity only. |
| 127506 | 127529 | */ |
| 127507 | | -/* not-private */ void (*sqlite3IoTrace)(const char*, ...) = 0; |
| 127530 | +SQLITE_API void (SQLITE_CDECL *sqlite3IoTrace)(const char*, ...) = 0; |
| 127508 | 127531 | #endif |
| 127509 | 127532 | |
| 127510 | 127533 | /* |
| 127511 | 127534 | ** If the following global variable points to a string which is the |
| 127512 | 127535 | ** name of a directory, then that directory will be used to store |
| | @@ -127554,11 +127577,11 @@ |
| 127554 | 127577 | ** call by X completes. |
| 127555 | 127578 | ** |
| 127556 | 127579 | ** * Recursive calls to this routine from thread X return immediately |
| 127557 | 127580 | ** without blocking. |
| 127558 | 127581 | */ |
| 127559 | | -SQLITE_API int sqlite3_initialize(void){ |
| 127582 | +SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void){ |
| 127560 | 127583 | MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */ |
| 127561 | 127584 | int rc; /* Result code */ |
| 127562 | 127585 | #ifdef SQLITE_EXTRA_INIT |
| 127563 | 127586 | int bRunExtraInit = 0; /* Extra initialization needed */ |
| 127564 | 127587 | #endif |
| | @@ -127715,11 +127738,11 @@ |
| 127715 | 127738 | ** while any part of SQLite is otherwise in use in any thread. This |
| 127716 | 127739 | ** routine is not threadsafe. But it is safe to invoke this routine |
| 127717 | 127740 | ** on when SQLite is already shut down. If SQLite is already shut down |
| 127718 | 127741 | ** when this routine is invoked, then this routine is a harmless no-op. |
| 127719 | 127742 | */ |
| 127720 | | -SQLITE_API int sqlite3_shutdown(void){ |
| 127743 | +SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void){ |
| 127721 | 127744 | #ifdef SQLITE_OMIT_WSD |
| 127722 | 127745 | int rc = sqlite3_wsd_init(4096, 24); |
| 127723 | 127746 | if( rc!=SQLITE_OK ){ |
| 127724 | 127747 | return rc; |
| 127725 | 127748 | } |
| | @@ -127769,11 +127792,11 @@ |
| 127769 | 127792 | ** This routine should only be called when there are no outstanding |
| 127770 | 127793 | ** database connections or memory allocations. This routine is not |
| 127771 | 127794 | ** threadsafe. Failure to heed these warnings can lead to unpredictable |
| 127772 | 127795 | ** behavior. |
| 127773 | 127796 | */ |
| 127774 | | -SQLITE_API int sqlite3_config(int op, ...){ |
| 127797 | +SQLITE_API int SQLITE_CDECL sqlite3_config(int op, ...){ |
| 127775 | 127798 | va_list ap; |
| 127776 | 127799 | int rc = SQLITE_OK; |
| 127777 | 127800 | |
| 127778 | 127801 | /* sqlite3_config() shall return SQLITE_MISUSE if it is invoked while |
| 127779 | 127802 | ** the SQLite library is in use. */ |
| | @@ -128126,11 +128149,11 @@ |
| 128126 | 128149 | } |
| 128127 | 128150 | |
| 128128 | 128151 | /* |
| 128129 | 128152 | ** Return the mutex associated with a database connection. |
| 128130 | 128153 | */ |
| 128131 | | -SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3 *db){ |
| 128154 | +SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3 *db){ |
| 128132 | 128155 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 128133 | 128156 | if( !sqlite3SafetyCheckOk(db) ){ |
| 128134 | 128157 | (void)SQLITE_MISUSE_BKPT; |
| 128135 | 128158 | return 0; |
| 128136 | 128159 | } |
| | @@ -128140,11 +128163,11 @@ |
| 128140 | 128163 | |
| 128141 | 128164 | /* |
| 128142 | 128165 | ** Free up as much memory as we can from the given database |
| 128143 | 128166 | ** connection. |
| 128144 | 128167 | */ |
| 128145 | | -SQLITE_API int sqlite3_db_release_memory(sqlite3 *db){ |
| 128168 | +SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3 *db){ |
| 128146 | 128169 | int i; |
| 128147 | 128170 | |
| 128148 | 128171 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 128149 | 128172 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| 128150 | 128173 | #endif |
| | @@ -128163,11 +128186,11 @@ |
| 128163 | 128186 | } |
| 128164 | 128187 | |
| 128165 | 128188 | /* |
| 128166 | 128189 | ** Configuration settings for an individual database connection |
| 128167 | 128190 | */ |
| 128168 | | -SQLITE_API int sqlite3_db_config(sqlite3 *db, int op, ...){ |
| 128191 | +SQLITE_API int SQLITE_CDECL sqlite3_db_config(sqlite3 *db, int op, ...){ |
| 128169 | 128192 | va_list ap; |
| 128170 | 128193 | int rc; |
| 128171 | 128194 | va_start(ap, op); |
| 128172 | 128195 | switch( op ){ |
| 128173 | 128196 | case SQLITE_DBCONFIG_LOOKASIDE: { |
| | @@ -128282,11 +128305,11 @@ |
| 128282 | 128305 | } |
| 128283 | 128306 | |
| 128284 | 128307 | /* |
| 128285 | 128308 | ** Return the ROWID of the most recent insert |
| 128286 | 128309 | */ |
| 128287 | | -SQLITE_API sqlite_int64 sqlite3_last_insert_rowid(sqlite3 *db){ |
| 128310 | +SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3 *db){ |
| 128288 | 128311 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 128289 | 128312 | if( !sqlite3SafetyCheckOk(db) ){ |
| 128290 | 128313 | (void)SQLITE_MISUSE_BKPT; |
| 128291 | 128314 | return 0; |
| 128292 | 128315 | } |
| | @@ -128295,11 +128318,11 @@ |
| 128295 | 128318 | } |
| 128296 | 128319 | |
| 128297 | 128320 | /* |
| 128298 | 128321 | ** Return the number of changes in the most recent call to sqlite3_exec(). |
| 128299 | 128322 | */ |
| 128300 | | -SQLITE_API int sqlite3_changes(sqlite3 *db){ |
| 128323 | +SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3 *db){ |
| 128301 | 128324 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 128302 | 128325 | if( !sqlite3SafetyCheckOk(db) ){ |
| 128303 | 128326 | (void)SQLITE_MISUSE_BKPT; |
| 128304 | 128327 | return 0; |
| 128305 | 128328 | } |
| | @@ -128308,11 +128331,11 @@ |
| 128308 | 128331 | } |
| 128309 | 128332 | |
| 128310 | 128333 | /* |
| 128311 | 128334 | ** Return the number of changes since the database handle was opened. |
| 128312 | 128335 | */ |
| 128313 | | -SQLITE_API int sqlite3_total_changes(sqlite3 *db){ |
| 128336 | +SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3 *db){ |
| 128314 | 128337 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 128315 | 128338 | if( !sqlite3SafetyCheckOk(db) ){ |
| 128316 | 128339 | (void)SQLITE_MISUSE_BKPT; |
| 128317 | 128340 | return 0; |
| 128318 | 128341 | } |
| | @@ -128450,12 +128473,12 @@ |
| 128450 | 128473 | ** statements or unfinished sqlite3_backups. The sqlite3_close_v2() |
| 128451 | 128474 | ** version forces the connection to become a zombie if there are |
| 128452 | 128475 | ** unclosed resources, and arranges for deallocation when the last |
| 128453 | 128476 | ** prepare statement or sqlite3_backup closes. |
| 128454 | 128477 | */ |
| 128455 | | -SQLITE_API int sqlite3_close(sqlite3 *db){ return sqlite3Close(db,0); } |
| 128456 | | -SQLITE_API int sqlite3_close_v2(sqlite3 *db){ return sqlite3Close(db,1); } |
| 128478 | +SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3 *db){ return sqlite3Close(db,0); } |
| 128479 | +SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3 *db){ return sqlite3Close(db,1); } |
| 128457 | 128480 | |
| 128458 | 128481 | |
| 128459 | 128482 | /* |
| 128460 | 128483 | ** Close the mutex on database connection db. |
| 128461 | 128484 | ** |
| | @@ -128858,11 +128881,11 @@ |
| 128858 | 128881 | |
| 128859 | 128882 | /* |
| 128860 | 128883 | ** This routine sets the busy callback for an Sqlite database to the |
| 128861 | 128884 | ** given callback function with the given argument. |
| 128862 | 128885 | */ |
| 128863 | | -SQLITE_API int sqlite3_busy_handler( |
| 128886 | +SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler( |
| 128864 | 128887 | sqlite3 *db, |
| 128865 | 128888 | int (*xBusy)(void*,int), |
| 128866 | 128889 | void *pArg |
| 128867 | 128890 | ){ |
| 128868 | 128891 | #ifdef SQLITE_ENABLE_API_ARMOR |
| | @@ -128881,11 +128904,11 @@ |
| 128881 | 128904 | /* |
| 128882 | 128905 | ** This routine sets the progress callback for an Sqlite database to the |
| 128883 | 128906 | ** given callback function with the given argument. The progress callback will |
| 128884 | 128907 | ** be invoked every nOps opcodes. |
| 128885 | 128908 | */ |
| 128886 | | -SQLITE_API void sqlite3_progress_handler( |
| 128909 | +SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler( |
| 128887 | 128910 | sqlite3 *db, |
| 128888 | 128911 | int nOps, |
| 128889 | 128912 | int (*xProgress)(void*), |
| 128890 | 128913 | void *pArg |
| 128891 | 128914 | ){ |
| | @@ -128912,11 +128935,11 @@ |
| 128912 | 128935 | |
| 128913 | 128936 | /* |
| 128914 | 128937 | ** This routine installs a default busy handler that waits for the |
| 128915 | 128938 | ** specified number of milliseconds before returning 0. |
| 128916 | 128939 | */ |
| 128917 | | -SQLITE_API int sqlite3_busy_timeout(sqlite3 *db, int ms){ |
| 128940 | +SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3 *db, int ms){ |
| 128918 | 128941 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 128919 | 128942 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| 128920 | 128943 | #endif |
| 128921 | 128944 | if( ms>0 ){ |
| 128922 | 128945 | sqlite3_busy_handler(db, sqliteDefaultBusyCallback, (void*)db); |
| | @@ -128928,11 +128951,11 @@ |
| 128928 | 128951 | } |
| 128929 | 128952 | |
| 128930 | 128953 | /* |
| 128931 | 128954 | ** Cause any pending operation to stop at its earliest opportunity. |
| 128932 | 128955 | */ |
| 128933 | | -SQLITE_API void sqlite3_interrupt(sqlite3 *db){ |
| 128956 | +SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3 *db){ |
| 128934 | 128957 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 128935 | 128958 | if( !sqlite3SafetyCheckOk(db) ){ |
| 128936 | 128959 | (void)SQLITE_MISUSE_BKPT; |
| 128937 | 128960 | return; |
| 128938 | 128961 | } |
| | @@ -129045,11 +129068,11 @@ |
| 129045 | 129068 | } |
| 129046 | 129069 | |
| 129047 | 129070 | /* |
| 129048 | 129071 | ** Create new user functions. |
| 129049 | 129072 | */ |
| 129050 | | -SQLITE_API int sqlite3_create_function( |
| 129073 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_function( |
| 129051 | 129074 | sqlite3 *db, |
| 129052 | 129075 | const char *zFunc, |
| 129053 | 129076 | int nArg, |
| 129054 | 129077 | int enc, |
| 129055 | 129078 | void *p, |
| | @@ -129059,11 +129082,11 @@ |
| 129059 | 129082 | ){ |
| 129060 | 129083 | return sqlite3_create_function_v2(db, zFunc, nArg, enc, p, xFunc, xStep, |
| 129061 | 129084 | xFinal, 0); |
| 129062 | 129085 | } |
| 129063 | 129086 | |
| 129064 | | -SQLITE_API int sqlite3_create_function_v2( |
| 129087 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2( |
| 129065 | 129088 | sqlite3 *db, |
| 129066 | 129089 | const char *zFunc, |
| 129067 | 129090 | int nArg, |
| 129068 | 129091 | int enc, |
| 129069 | 129092 | void *p, |
| | @@ -129102,11 +129125,11 @@ |
| 129102 | 129125 | sqlite3_mutex_leave(db->mutex); |
| 129103 | 129126 | return rc; |
| 129104 | 129127 | } |
| 129105 | 129128 | |
| 129106 | 129129 | #ifndef SQLITE_OMIT_UTF16 |
| 129107 | | -SQLITE_API int sqlite3_create_function16( |
| 129130 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_function16( |
| 129108 | 129131 | sqlite3 *db, |
| 129109 | 129132 | const void *zFunctionName, |
| 129110 | 129133 | int nArg, |
| 129111 | 129134 | int eTextRep, |
| 129112 | 129135 | void *p, |
| | @@ -129142,11 +129165,11 @@ |
| 129142 | 129165 | ** When virtual tables intend to provide an overloaded function, they |
| 129143 | 129166 | ** should call this routine to make sure the global function exists. |
| 129144 | 129167 | ** A global function must exist in order for name resolution to work |
| 129145 | 129168 | ** properly. |
| 129146 | 129169 | */ |
| 129147 | | -SQLITE_API int sqlite3_overload_function( |
| 129170 | +SQLITE_API int SQLITE_STDCALL sqlite3_overload_function( |
| 129148 | 129171 | sqlite3 *db, |
| 129149 | 129172 | const char *zName, |
| 129150 | 129173 | int nArg |
| 129151 | 129174 | ){ |
| 129152 | 129175 | int nName = sqlite3Strlen30(zName); |
| | @@ -129174,11 +129197,11 @@ |
| 129174 | 129197 | ** |
| 129175 | 129198 | ** A NULL trace function means that no tracing is executes. A non-NULL |
| 129176 | 129199 | ** trace is a pointer to a function that is invoked at the start of each |
| 129177 | 129200 | ** SQL statement. |
| 129178 | 129201 | */ |
| 129179 | | -SQLITE_API void *sqlite3_trace(sqlite3 *db, void (*xTrace)(void*,const char*), void *pArg){ |
| 129202 | +SQLITE_API void *SQLITE_STDCALL sqlite3_trace(sqlite3 *db, void (*xTrace)(void*,const char*), void *pArg){ |
| 129180 | 129203 | void *pOld; |
| 129181 | 129204 | |
| 129182 | 129205 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 129183 | 129206 | if( !sqlite3SafetyCheckOk(db) ){ |
| 129184 | 129207 | (void)SQLITE_MISUSE_BKPT; |
| | @@ -129198,11 +129221,11 @@ |
| 129198 | 129221 | ** |
| 129199 | 129222 | ** A NULL profile function means that no profiling is executes. A non-NULL |
| 129200 | 129223 | ** profile is a pointer to a function that is invoked at the conclusion of |
| 129201 | 129224 | ** each SQL statement that is run. |
| 129202 | 129225 | */ |
| 129203 | | -SQLITE_API void *sqlite3_profile( |
| 129226 | +SQLITE_API void *SQLITE_STDCALL sqlite3_profile( |
| 129204 | 129227 | sqlite3 *db, |
| 129205 | 129228 | void (*xProfile)(void*,const char*,sqlite_uint64), |
| 129206 | 129229 | void *pArg |
| 129207 | 129230 | ){ |
| 129208 | 129231 | void *pOld; |
| | @@ -129225,11 +129248,11 @@ |
| 129225 | 129248 | /* |
| 129226 | 129249 | ** Register a function to be invoked when a transaction commits. |
| 129227 | 129250 | ** If the invoked function returns non-zero, then the commit becomes a |
| 129228 | 129251 | ** rollback. |
| 129229 | 129252 | */ |
| 129230 | | -SQLITE_API void *sqlite3_commit_hook( |
| 129253 | +SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook( |
| 129231 | 129254 | sqlite3 *db, /* Attach the hook to this database */ |
| 129232 | 129255 | int (*xCallback)(void*), /* Function to invoke on each commit */ |
| 129233 | 129256 | void *pArg /* Argument to the function */ |
| 129234 | 129257 | ){ |
| 129235 | 129258 | void *pOld; |
| | @@ -129250,11 +129273,11 @@ |
| 129250 | 129273 | |
| 129251 | 129274 | /* |
| 129252 | 129275 | ** Register a callback to be invoked each time a row is updated, |
| 129253 | 129276 | ** inserted or deleted using this database connection. |
| 129254 | 129277 | */ |
| 129255 | | -SQLITE_API void *sqlite3_update_hook( |
| 129278 | +SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook( |
| 129256 | 129279 | sqlite3 *db, /* Attach the hook to this database */ |
| 129257 | 129280 | void (*xCallback)(void*,int,char const *,char const *,sqlite_int64), |
| 129258 | 129281 | void *pArg /* Argument to the function */ |
| 129259 | 129282 | ){ |
| 129260 | 129283 | void *pRet; |
| | @@ -129275,11 +129298,11 @@ |
| 129275 | 129298 | |
| 129276 | 129299 | /* |
| 129277 | 129300 | ** Register a callback to be invoked each time a transaction is rolled |
| 129278 | 129301 | ** back by this database connection. |
| 129279 | 129302 | */ |
| 129280 | | -SQLITE_API void *sqlite3_rollback_hook( |
| 129303 | +SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook( |
| 129281 | 129304 | sqlite3 *db, /* Attach the hook to this database */ |
| 129282 | 129305 | void (*xCallback)(void*), /* Callback function */ |
| 129283 | 129306 | void *pArg /* Argument to the function */ |
| 129284 | 129307 | ){ |
| 129285 | 129308 | void *pRet; |
| | @@ -129329,11 +129352,11 @@ |
| 129329 | 129352 | ** The callback registered by this function replaces any existing callback |
| 129330 | 129353 | ** registered using sqlite3_wal_hook(). Likewise, registering a callback |
| 129331 | 129354 | ** using sqlite3_wal_hook() disables the automatic checkpoint mechanism |
| 129332 | 129355 | ** configured by this function. |
| 129333 | 129356 | */ |
| 129334 | | -SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){ |
| 129357 | +SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){ |
| 129335 | 129358 | #ifdef SQLITE_OMIT_WAL |
| 129336 | 129359 | UNUSED_PARAMETER(db); |
| 129337 | 129360 | UNUSED_PARAMETER(nFrame); |
| 129338 | 129361 | #else |
| 129339 | 129362 | #ifdef SQLITE_ENABLE_API_ARMOR |
| | @@ -129350,11 +129373,11 @@ |
| 129350 | 129373 | |
| 129351 | 129374 | /* |
| 129352 | 129375 | ** Register a callback to be invoked each time a transaction is written |
| 129353 | 129376 | ** into the write-ahead-log by this database connection. |
| 129354 | 129377 | */ |
| 129355 | | -SQLITE_API void *sqlite3_wal_hook( |
| 129378 | +SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook( |
| 129356 | 129379 | sqlite3 *db, /* Attach the hook to this db handle */ |
| 129357 | 129380 | int(*xCallback)(void *, sqlite3*, const char*, int), |
| 129358 | 129381 | void *pArg /* First argument passed to xCallback() */ |
| 129359 | 129382 | ){ |
| 129360 | 129383 | #ifndef SQLITE_OMIT_WAL |
| | @@ -129377,11 +129400,11 @@ |
| 129377 | 129400 | } |
| 129378 | 129401 | |
| 129379 | 129402 | /* |
| 129380 | 129403 | ** Checkpoint database zDb. |
| 129381 | 129404 | */ |
| 129382 | | -SQLITE_API int sqlite3_wal_checkpoint_v2( |
| 129405 | +SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2( |
| 129383 | 129406 | sqlite3 *db, /* Database handle */ |
| 129384 | 129407 | const char *zDb, /* Name of attached database (or NULL) */ |
| 129385 | 129408 | int eMode, /* SQLITE_CHECKPOINT_* value */ |
| 129386 | 129409 | int *pnLog, /* OUT: Size of WAL log in frames */ |
| 129387 | 129410 | int *pnCkpt /* OUT: Total number of frames checkpointed */ |
| | @@ -129432,11 +129455,11 @@ |
| 129432 | 129455 | /* |
| 129433 | 129456 | ** Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points |
| 129434 | 129457 | ** to contains a zero-length string, all attached databases are |
| 129435 | 129458 | ** checkpointed. |
| 129436 | 129459 | */ |
| 129437 | | -SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){ |
| 129460 | +SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){ |
| 129438 | 129461 | /* EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to |
| 129439 | 129462 | ** sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). */ |
| 129440 | 129463 | return sqlite3_wal_checkpoint_v2(db,zDb,SQLITE_CHECKPOINT_PASSIVE,0,0); |
| 129441 | 129464 | } |
| 129442 | 129465 | |
| | @@ -129521,11 +129544,11 @@ |
| 129521 | 129544 | |
| 129522 | 129545 | /* |
| 129523 | 129546 | ** Return UTF-8 encoded English language explanation of the most recent |
| 129524 | 129547 | ** error. |
| 129525 | 129548 | */ |
| 129526 | | -SQLITE_API const char *sqlite3_errmsg(sqlite3 *db){ |
| 129549 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3 *db){ |
| 129527 | 129550 | const char *z; |
| 129528 | 129551 | if( !db ){ |
| 129529 | 129552 | return sqlite3ErrStr(SQLITE_NOMEM); |
| 129530 | 129553 | } |
| 129531 | 129554 | if( !sqlite3SafetyCheckSickOrOk(db) ){ |
| | @@ -129549,11 +129572,11 @@ |
| 129549 | 129572 | #ifndef SQLITE_OMIT_UTF16 |
| 129550 | 129573 | /* |
| 129551 | 129574 | ** Return UTF-16 encoded English language explanation of the most recent |
| 129552 | 129575 | ** error. |
| 129553 | 129576 | */ |
| 129554 | | -SQLITE_API const void *sqlite3_errmsg16(sqlite3 *db){ |
| 129577 | +SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3 *db){ |
| 129555 | 129578 | static const u16 outOfMem[] = { |
| 129556 | 129579 | 'o', 'u', 't', ' ', 'o', 'f', ' ', 'm', 'e', 'm', 'o', 'r', 'y', 0 |
| 129557 | 129580 | }; |
| 129558 | 129581 | static const u16 misuse[] = { |
| 129559 | 129582 | 'l', 'i', 'b', 'r', 'a', 'r', 'y', ' ', |
| | @@ -129594,20 +129617,20 @@ |
| 129594 | 129617 | |
| 129595 | 129618 | /* |
| 129596 | 129619 | ** Return the most recent error code generated by an SQLite routine. If NULL is |
| 129597 | 129620 | ** passed to this function, we assume a malloc() failed during sqlite3_open(). |
| 129598 | 129621 | */ |
| 129599 | | -SQLITE_API int sqlite3_errcode(sqlite3 *db){ |
| 129622 | +SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db){ |
| 129600 | 129623 | if( db && !sqlite3SafetyCheckSickOrOk(db) ){ |
| 129601 | 129624 | return SQLITE_MISUSE_BKPT; |
| 129602 | 129625 | } |
| 129603 | 129626 | if( !db || db->mallocFailed ){ |
| 129604 | 129627 | return SQLITE_NOMEM; |
| 129605 | 129628 | } |
| 129606 | 129629 | return db->errCode & db->errMask; |
| 129607 | 129630 | } |
| 129608 | | -SQLITE_API int sqlite3_extended_errcode(sqlite3 *db){ |
| 129631 | +SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db){ |
| 129609 | 129632 | if( db && !sqlite3SafetyCheckSickOrOk(db) ){ |
| 129610 | 129633 | return SQLITE_MISUSE_BKPT; |
| 129611 | 129634 | } |
| 129612 | 129635 | if( !db || db->mallocFailed ){ |
| 129613 | 129636 | return SQLITE_NOMEM; |
| | @@ -129618,11 +129641,11 @@ |
| 129618 | 129641 | /* |
| 129619 | 129642 | ** Return a string that describes the kind of error specified in the |
| 129620 | 129643 | ** argument. For now, this simply calls the internal sqlite3ErrStr() |
| 129621 | 129644 | ** function. |
| 129622 | 129645 | */ |
| 129623 | | -SQLITE_API const char *sqlite3_errstr(int rc){ |
| 129646 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int rc){ |
| 129624 | 129647 | return sqlite3ErrStr(rc); |
| 129625 | 129648 | } |
| 129626 | 129649 | |
| 129627 | 129650 | /* |
| 129628 | 129651 | ** Create a new collating function for database "db". The name is zName |
| | @@ -129766,11 +129789,11 @@ |
| 129766 | 129789 | ** |
| 129767 | 129790 | ** A new lower limit does not shrink existing constructs. |
| 129768 | 129791 | ** It merely prevents new constructs that exceed the limit |
| 129769 | 129792 | ** from forming. |
| 129770 | 129793 | */ |
| 129771 | | -SQLITE_API int sqlite3_limit(sqlite3 *db, int limitId, int newLimit){ |
| 129794 | +SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3 *db, int limitId, int newLimit){ |
| 129772 | 129795 | int oldLimit; |
| 129773 | 129796 | |
| 129774 | 129797 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 129775 | 129798 | if( !sqlite3SafetyCheckOk(db) ){ |
| 129776 | 129799 | (void)SQLITE_MISUSE_BKPT; |
| | @@ -130351,18 +130374,18 @@ |
| 130351 | 130374 | } |
| 130352 | 130375 | |
| 130353 | 130376 | /* |
| 130354 | 130377 | ** Open a new database handle. |
| 130355 | 130378 | */ |
| 130356 | | -SQLITE_API int sqlite3_open( |
| 130379 | +SQLITE_API int SQLITE_STDCALL sqlite3_open( |
| 130357 | 130380 | const char *zFilename, |
| 130358 | 130381 | sqlite3 **ppDb |
| 130359 | 130382 | ){ |
| 130360 | 130383 | return openDatabase(zFilename, ppDb, |
| 130361 | 130384 | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0); |
| 130362 | 130385 | } |
| 130363 | | -SQLITE_API int sqlite3_open_v2( |
| 130386 | +SQLITE_API int SQLITE_STDCALL sqlite3_open_v2( |
| 130364 | 130387 | const char *filename, /* Database filename (UTF-8) */ |
| 130365 | 130388 | sqlite3 **ppDb, /* OUT: SQLite db handle */ |
| 130366 | 130389 | int flags, /* Flags */ |
| 130367 | 130390 | const char *zVfs /* Name of VFS module to use */ |
| 130368 | 130391 | ){ |
| | @@ -130371,11 +130394,11 @@ |
| 130371 | 130394 | |
| 130372 | 130395 | #ifndef SQLITE_OMIT_UTF16 |
| 130373 | 130396 | /* |
| 130374 | 130397 | ** Open a new database handle. |
| 130375 | 130398 | */ |
| 130376 | | -SQLITE_API int sqlite3_open16( |
| 130399 | +SQLITE_API int SQLITE_STDCALL sqlite3_open16( |
| 130377 | 130400 | const void *zFilename, |
| 130378 | 130401 | sqlite3 **ppDb |
| 130379 | 130402 | ){ |
| 130380 | 130403 | char const *zFilename8; /* zFilename encoded in UTF-8 instead of UTF-16 */ |
| 130381 | 130404 | sqlite3_value *pVal; |
| | @@ -130410,11 +130433,11 @@ |
| 130410 | 130433 | #endif /* SQLITE_OMIT_UTF16 */ |
| 130411 | 130434 | |
| 130412 | 130435 | /* |
| 130413 | 130436 | ** Register a new collation sequence with the database handle db. |
| 130414 | 130437 | */ |
| 130415 | | -SQLITE_API int sqlite3_create_collation( |
| 130438 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_collation( |
| 130416 | 130439 | sqlite3* db, |
| 130417 | 130440 | const char *zName, |
| 130418 | 130441 | int enc, |
| 130419 | 130442 | void* pCtx, |
| 130420 | 130443 | int(*xCompare)(void*,int,const void*,int,const void*) |
| | @@ -130423,11 +130446,11 @@ |
| 130423 | 130446 | } |
| 130424 | 130447 | |
| 130425 | 130448 | /* |
| 130426 | 130449 | ** Register a new collation sequence with the database handle db. |
| 130427 | 130450 | */ |
| 130428 | | -SQLITE_API int sqlite3_create_collation_v2( |
| 130451 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2( |
| 130429 | 130452 | sqlite3* db, |
| 130430 | 130453 | const char *zName, |
| 130431 | 130454 | int enc, |
| 130432 | 130455 | void* pCtx, |
| 130433 | 130456 | int(*xCompare)(void*,int,const void*,int,const void*), |
| | @@ -130448,11 +130471,11 @@ |
| 130448 | 130471 | |
| 130449 | 130472 | #ifndef SQLITE_OMIT_UTF16 |
| 130450 | 130473 | /* |
| 130451 | 130474 | ** Register a new collation sequence with the database handle db. |
| 130452 | 130475 | */ |
| 130453 | | -SQLITE_API int sqlite3_create_collation16( |
| 130476 | +SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16( |
| 130454 | 130477 | sqlite3* db, |
| 130455 | 130478 | const void *zName, |
| 130456 | 130479 | int enc, |
| 130457 | 130480 | void* pCtx, |
| 130458 | 130481 | int(*xCompare)(void*,int,const void*,int,const void*) |
| | @@ -130478,11 +130501,11 @@ |
| 130478 | 130501 | |
| 130479 | 130502 | /* |
| 130480 | 130503 | ** Register a collation sequence factory callback with the database handle |
| 130481 | 130504 | ** db. Replace any previously installed collation sequence factory. |
| 130482 | 130505 | */ |
| 130483 | | -SQLITE_API int sqlite3_collation_needed( |
| 130506 | +SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed( |
| 130484 | 130507 | sqlite3 *db, |
| 130485 | 130508 | void *pCollNeededArg, |
| 130486 | 130509 | void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*) |
| 130487 | 130510 | ){ |
| 130488 | 130511 | #ifdef SQLITE_ENABLE_API_ARMOR |
| | @@ -130499,11 +130522,11 @@ |
| 130499 | 130522 | #ifndef SQLITE_OMIT_UTF16 |
| 130500 | 130523 | /* |
| 130501 | 130524 | ** Register a collation sequence factory callback with the database handle |
| 130502 | 130525 | ** db. Replace any previously installed collation sequence factory. |
| 130503 | 130526 | */ |
| 130504 | | -SQLITE_API int sqlite3_collation_needed16( |
| 130527 | +SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16( |
| 130505 | 130528 | sqlite3 *db, |
| 130506 | 130529 | void *pCollNeededArg, |
| 130507 | 130530 | void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*) |
| 130508 | 130531 | ){ |
| 130509 | 130532 | #ifdef SQLITE_ENABLE_API_ARMOR |
| | @@ -130521,11 +130544,11 @@ |
| 130521 | 130544 | #ifndef SQLITE_OMIT_DEPRECATED |
| 130522 | 130545 | /* |
| 130523 | 130546 | ** This function is now an anachronism. It used to be used to recover from a |
| 130524 | 130547 | ** malloc() failure, but SQLite now does this automatically. |
| 130525 | 130548 | */ |
| 130526 | | -SQLITE_API int sqlite3_global_recover(void){ |
| 130549 | +SQLITE_API int SQLITE_STDCALL sqlite3_global_recover(void){ |
| 130527 | 130550 | return SQLITE_OK; |
| 130528 | 130551 | } |
| 130529 | 130552 | #endif |
| 130530 | 130553 | |
| 130531 | 130554 | /* |
| | @@ -130532,11 +130555,11 @@ |
| 130532 | 130555 | ** Test to see whether or not the database connection is in autocommit |
| 130533 | 130556 | ** mode. Return TRUE if it is and FALSE if not. Autocommit mode is on |
| 130534 | 130557 | ** by default. Autocommit is disabled by a BEGIN statement and reenabled |
| 130535 | 130558 | ** by the next COMMIT or ROLLBACK. |
| 130536 | 130559 | */ |
| 130537 | | -SQLITE_API int sqlite3_get_autocommit(sqlite3 *db){ |
| 130560 | +SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3 *db){ |
| 130538 | 130561 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 130539 | 130562 | if( !sqlite3SafetyCheckOk(db) ){ |
| 130540 | 130563 | (void)SQLITE_MISUSE_BKPT; |
| 130541 | 130564 | return 0; |
| 130542 | 130565 | } |
| | @@ -130584,19 +130607,19 @@ |
| 130584 | 130607 | ** data for this thread has been deallocated. |
| 130585 | 130608 | ** |
| 130586 | 130609 | ** SQLite no longer uses thread-specific data so this routine is now a |
| 130587 | 130610 | ** no-op. It is retained for historical compatibility. |
| 130588 | 130611 | */ |
| 130589 | | -SQLITE_API void sqlite3_thread_cleanup(void){ |
| 130612 | +SQLITE_API void SQLITE_STDCALL sqlite3_thread_cleanup(void){ |
| 130590 | 130613 | } |
| 130591 | 130614 | #endif |
| 130592 | 130615 | |
| 130593 | 130616 | /* |
| 130594 | 130617 | ** Return meta information about a specific column of a database table. |
| 130595 | 130618 | ** See comment in sqlite3.h (sqlite.h.in) for details. |
| 130596 | 130619 | */ |
| 130597 | | -SQLITE_API int sqlite3_table_column_metadata( |
| 130620 | +SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata( |
| 130598 | 130621 | sqlite3 *db, /* Connection handle */ |
| 130599 | 130622 | const char *zDbName, /* Database name or NULL */ |
| 130600 | 130623 | const char *zTableName, /* Table name */ |
| 130601 | 130624 | const char *zColumnName, /* Column name */ |
| 130602 | 130625 | char const **pzDataType, /* OUTPUT: Declared data type */ |
| | @@ -130710,11 +130733,11 @@ |
| 130710 | 130733 | } |
| 130711 | 130734 | |
| 130712 | 130735 | /* |
| 130713 | 130736 | ** Sleep for a little while. Return the amount of time slept. |
| 130714 | 130737 | */ |
| 130715 | | -SQLITE_API int sqlite3_sleep(int ms){ |
| 130738 | +SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int ms){ |
| 130716 | 130739 | sqlite3_vfs *pVfs; |
| 130717 | 130740 | int rc; |
| 130718 | 130741 | pVfs = sqlite3_vfs_find(0); |
| 130719 | 130742 | if( pVfs==0 ) return 0; |
| 130720 | 130743 | |
| | @@ -130726,11 +130749,11 @@ |
| 130726 | 130749 | } |
| 130727 | 130750 | |
| 130728 | 130751 | /* |
| 130729 | 130752 | ** Enable or disable the extended result codes. |
| 130730 | 130753 | */ |
| 130731 | | -SQLITE_API int sqlite3_extended_result_codes(sqlite3 *db, int onoff){ |
| 130754 | +SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3 *db, int onoff){ |
| 130732 | 130755 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 130733 | 130756 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| 130734 | 130757 | #endif |
| 130735 | 130758 | sqlite3_mutex_enter(db->mutex); |
| 130736 | 130759 | db->errMask = onoff ? 0xffffffff : 0xff; |
| | @@ -130739,11 +130762,11 @@ |
| 130739 | 130762 | } |
| 130740 | 130763 | |
| 130741 | 130764 | /* |
| 130742 | 130765 | ** Invoke the xFileControl method on a particular database. |
| 130743 | 130766 | */ |
| 130744 | | -SQLITE_API int sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){ |
| 130767 | +SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){ |
| 130745 | 130768 | int rc = SQLITE_ERROR; |
| 130746 | 130769 | Btree *pBtree; |
| 130747 | 130770 | |
| 130748 | 130771 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 130749 | 130772 | if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; |
| | @@ -130773,11 +130796,11 @@ |
| 130773 | 130796 | } |
| 130774 | 130797 | |
| 130775 | 130798 | /* |
| 130776 | 130799 | ** Interface to the testing logic. |
| 130777 | 130800 | */ |
| 130778 | | -SQLITE_API int sqlite3_test_control(int op, ...){ |
| 130801 | +SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...){ |
| 130779 | 130802 | int rc = 0; |
| 130780 | 130803 | #ifndef SQLITE_OMIT_BUILTIN_TEST |
| 130781 | 130804 | va_list ap; |
| 130782 | 130805 | va_start(ap, op); |
| 130783 | 130806 | switch( op ){ |
| | @@ -131116,11 +131139,11 @@ |
| 131116 | 131139 | ** method of a VFS implementation. The zParam argument is the name of the |
| 131117 | 131140 | ** query parameter we seek. This routine returns the value of the zParam |
| 131118 | 131141 | ** parameter if it exists. If the parameter does not exist, this routine |
| 131119 | 131142 | ** returns a NULL pointer. |
| 131120 | 131143 | */ |
| 131121 | | -SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam){ |
| 131144 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam){ |
| 131122 | 131145 | if( zFilename==0 || zParam==0 ) return 0; |
| 131123 | 131146 | zFilename += sqlite3Strlen30(zFilename) + 1; |
| 131124 | 131147 | while( zFilename[0] ){ |
| 131125 | 131148 | int x = strcmp(zFilename, zParam); |
| 131126 | 131149 | zFilename += sqlite3Strlen30(zFilename) + 1; |
| | @@ -131131,20 +131154,20 @@ |
| 131131 | 131154 | } |
| 131132 | 131155 | |
| 131133 | 131156 | /* |
| 131134 | 131157 | ** Return a boolean value for a query parameter. |
| 131135 | 131158 | */ |
| 131136 | | -SQLITE_API int sqlite3_uri_boolean(const char *zFilename, const char *zParam, int bDflt){ |
| 131159 | +SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFilename, const char *zParam, int bDflt){ |
| 131137 | 131160 | const char *z = sqlite3_uri_parameter(zFilename, zParam); |
| 131138 | 131161 | bDflt = bDflt!=0; |
| 131139 | 131162 | return z ? sqlite3GetBoolean(z, bDflt) : bDflt; |
| 131140 | 131163 | } |
| 131141 | 131164 | |
| 131142 | 131165 | /* |
| 131143 | 131166 | ** Return a 64-bit integer value for a query parameter. |
| 131144 | 131167 | */ |
| 131145 | | -SQLITE_API sqlite3_int64 sqlite3_uri_int64( |
| 131168 | +SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64( |
| 131146 | 131169 | const char *zFilename, /* Filename as passed to xOpen */ |
| 131147 | 131170 | const char *zParam, /* URI parameter sought */ |
| 131148 | 131171 | sqlite3_int64 bDflt /* return if parameter is missing */ |
| 131149 | 131172 | ){ |
| 131150 | 131173 | const char *z = sqlite3_uri_parameter(zFilename, zParam); |
| | @@ -131172,11 +131195,11 @@ |
| 131172 | 131195 | |
| 131173 | 131196 | /* |
| 131174 | 131197 | ** Return the filename of the database associated with a database |
| 131175 | 131198 | ** connection. |
| 131176 | 131199 | */ |
| 131177 | | -SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName){ |
| 131200 | +SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName){ |
| 131178 | 131201 | Btree *pBt; |
| 131179 | 131202 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 131180 | 131203 | if( !sqlite3SafetyCheckOk(db) ){ |
| 131181 | 131204 | (void)SQLITE_MISUSE_BKPT; |
| 131182 | 131205 | return 0; |
| | @@ -131188,11 +131211,11 @@ |
| 131188 | 131211 | |
| 131189 | 131212 | /* |
| 131190 | 131213 | ** Return 1 if database is read-only or 0 if read/write. Return -1 if |
| 131191 | 131214 | ** no such database exists. |
| 131192 | 131215 | */ |
| 131193 | | -SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName){ |
| 131216 | +SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName){ |
| 131194 | 131217 | Btree *pBt; |
| 131195 | 131218 | #ifdef SQLITE_ENABLE_API_ARMOR |
| 131196 | 131219 | if( !sqlite3SafetyCheckOk(db) ){ |
| 131197 | 131220 | (void)SQLITE_MISUSE_BKPT; |
| 131198 | 131221 | return -1; |
| | @@ -131347,11 +131370,11 @@ |
| 131347 | 131370 | ** |
| 131348 | 131371 | ** Each call to this routine overrides any prior callbacks registered |
| 131349 | 131372 | ** on the same "db". If xNotify==0 then any prior callbacks are immediately |
| 131350 | 131373 | ** cancelled. |
| 131351 | 131374 | */ |
| 131352 | | -SQLITE_API int sqlite3_unlock_notify( |
| 131375 | +SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify( |
| 131353 | 131376 | sqlite3 *db, |
| 131354 | 131377 | void (*xNotify)(void **, int), |
| 131355 | 131378 | void *pArg |
| 131356 | 131379 | ){ |
| 131357 | 131380 | int rc = SQLITE_OK; |
| | @@ -133525,11 +133548,11 @@ |
| 133525 | 133548 | int nName; /* Bytes required to hold table name */ |
| 133526 | 133549 | int isFts4 = (argv[0][3]=='4'); /* True for FTS4, false for FTS3 */ |
| 133527 | 133550 | const char **aCol; /* Array of column names */ |
| 133528 | 133551 | sqlite3_tokenizer *pTokenizer = 0; /* Tokenizer for this table */ |
| 133529 | 133552 | |
| 133530 | | - int nIndex; /* Size of aIndex[] array */ |
| 133553 | + int nIndex = 0; /* Size of aIndex[] array */ |
| 133531 | 133554 | struct Fts3Index *aIndex = 0; /* Array of indexes for this table */ |
| 133532 | 133555 | |
| 133533 | 133556 | /* The results of parsing supported FTS4 key=value options: */ |
| 133534 | 133557 | int bNoDocsize = 0; /* True to omit %_docsize table */ |
| 133535 | 133558 | int bDescIdx = 0; /* True to store descending indexes */ |
| | @@ -138213,11 +138236,11 @@ |
| 138213 | 138236 | ** Initialize API pointer table, if required. |
| 138214 | 138237 | */ |
| 138215 | 138238 | #ifdef _WIN32 |
| 138216 | 138239 | __declspec(dllexport) |
| 138217 | 138240 | #endif |
| 138218 | | -SQLITE_API int sqlite3_fts3_init( |
| 138241 | +SQLITE_API int SQLITE_STDCALL sqlite3_fts3_init( |
| 138219 | 138242 | sqlite3 *db, |
| 138220 | 138243 | char **pzErrMsg, |
| 138221 | 138244 | const sqlite3_api_routines *pApi |
| 138222 | 138245 | ){ |
| 138223 | 138246 | SQLITE_EXTENSION_INIT2(pApi) |
| | @@ -153660,11 +153683,11 @@ |
| 153660 | 153683 | } |
| 153661 | 153684 | |
| 153662 | 153685 | /* |
| 153663 | 153686 | ** Register a new geometry function for use with the r-tree MATCH operator. |
| 153664 | 153687 | */ |
| 153665 | | -SQLITE_API int sqlite3_rtree_geometry_callback( |
| 153688 | +SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback( |
| 153666 | 153689 | sqlite3 *db, /* Register SQL function on this connection */ |
| 153667 | 153690 | const char *zGeom, /* Name of the new SQL function */ |
| 153668 | 153691 | int (*xGeom)(sqlite3_rtree_geometry*,int,RtreeDValue*,int*), /* Callback */ |
| 153669 | 153692 | void *pContext /* Extra data associated with the callback */ |
| 153670 | 153693 | ){ |
| | @@ -153684,11 +153707,11 @@ |
| 153684 | 153707 | |
| 153685 | 153708 | /* |
| 153686 | 153709 | ** Register a new 2nd-generation geometry function for use with the |
| 153687 | 153710 | ** r-tree MATCH operator. |
| 153688 | 153711 | */ |
| 153689 | | -SQLITE_API int sqlite3_rtree_query_callback( |
| 153712 | +SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback( |
| 153690 | 153713 | sqlite3 *db, /* Register SQL function on this connection */ |
| 153691 | 153714 | const char *zQueryFunc, /* Name of new SQL function */ |
| 153692 | 153715 | int (*xQueryFunc)(sqlite3_rtree_query_info*), /* Callback */ |
| 153693 | 153716 | void *pContext, /* Extra data passed into the callback */ |
| 153694 | 153717 | void (*xDestructor)(void*) /* Destructor for the extra data */ |
| | @@ -153709,11 +153732,11 @@ |
| 153709 | 153732 | |
| 153710 | 153733 | #if !SQLITE_CORE |
| 153711 | 153734 | #ifdef _WIN32 |
| 153712 | 153735 | __declspec(dllexport) |
| 153713 | 153736 | #endif |
| 153714 | | -SQLITE_API int sqlite3_rtree_init( |
| 153737 | +SQLITE_API int SQLITE_STDCALL sqlite3_rtree_init( |
| 153715 | 153738 | sqlite3 *db, |
| 153716 | 153739 | char **pzErrMsg, |
| 153717 | 153740 | const sqlite3_api_routines *pApi |
| 153718 | 153741 | ){ |
| 153719 | 153742 | SQLITE_EXTENSION_INIT2(pApi) |
| | @@ -154214,11 +154237,11 @@ |
| 154214 | 154237 | |
| 154215 | 154238 | #if !SQLITE_CORE |
| 154216 | 154239 | #ifdef _WIN32 |
| 154217 | 154240 | __declspec(dllexport) |
| 154218 | 154241 | #endif |
| 154219 | | -SQLITE_API int sqlite3_icu_init( |
| 154242 | +SQLITE_API int SQLITE_STDCALL sqlite3_icu_init( |
| 154220 | 154243 | sqlite3 *db, |
| 154221 | 154244 | char **pzErrMsg, |
| 154222 | 154245 | const sqlite3_api_routines *pApi |
| 154223 | 154246 | ){ |
| 154224 | 154247 | SQLITE_EXTENSION_INIT2(pApi) |
| 154225 | 154248 | |