update amalgamation code
parent
e118d44513
commit
297d6f8d2d
|
@ -11,7 +11,11 @@ package sqlite3
|
||||||
// code for SQLite custom functions is in here.
|
// code for SQLite custom functions is in here.
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
#ifndef USE_LIBSQLITE3
|
||||||
#include <sqlite3-binding.h>
|
#include <sqlite3-binding.h>
|
||||||
|
#else
|
||||||
|
#include <sqlite3.h>
|
||||||
|
#endif
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
void _sqlite3_result_text(sqlite3_context* ctx, const char* s);
|
void _sqlite3_result_text(sqlite3_context* ctx, const char* s);
|
||||||
|
|
15960
sqlite3-binding.c
15960
sqlite3-binding.c
File diff suppressed because it is too large
Load Diff
1701
sqlite3-binding.h
1701
sqlite3-binding.h
File diff suppressed because it is too large
Load Diff
|
@ -7,7 +7,11 @@
|
||||||
package sqlite3
|
package sqlite3
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
#ifndef USE_LIBSQLITE3
|
||||||
#include <sqlite3-binding.h>
|
#include <sqlite3-binding.h>
|
||||||
|
#else
|
||||||
|
#include <sqlite3.h>
|
||||||
|
#endif
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
*/
|
*/
|
||||||
import "C"
|
import "C"
|
||||||
|
|
32
sqlite3ext.h
32
sqlite3ext.h
|
@ -12,14 +12,12 @@
|
||||||
** This header file defines the SQLite interface for use by
|
** This header file defines the SQLite interface for use by
|
||||||
** shared libraries that want to be imported as extensions into
|
** shared libraries that want to be imported as extensions into
|
||||||
** an SQLite instance. Shared libraries that intend to be loaded
|
** an SQLite instance. Shared libraries that intend to be loaded
|
||||||
** as extensions by SQLite should #include this file instead of
|
** as extensions by SQLite should #include this file instead of
|
||||||
** sqlite3.h.
|
** sqlite3.h.
|
||||||
*/
|
*/
|
||||||
#ifndef _SQLITE3EXT_H_
|
#ifndef SQLITE3EXT_H
|
||||||
#define _SQLITE3EXT_H_
|
#define SQLITE3EXT_H
|
||||||
#include "sqlite3-binding.h"
|
#include "sqlite3.h"
|
||||||
|
|
||||||
typedef struct sqlite3_api_routines sqlite3_api_routines;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** The following structure holds pointers to all of the SQLite API
|
** The following structure holds pointers to all of the SQLite API
|
||||||
|
@ -281,8 +279,21 @@ struct sqlite3_api_routines {
|
||||||
int (*db_cacheflush)(sqlite3*);
|
int (*db_cacheflush)(sqlite3*);
|
||||||
/* Version 3.12.0 and later */
|
/* Version 3.12.0 and later */
|
||||||
int (*system_errno)(sqlite3*);
|
int (*system_errno)(sqlite3*);
|
||||||
|
/* Version 3.14.0 and later */
|
||||||
|
int (*trace_v2)(sqlite3*,unsigned,int(*)(unsigned,void*,void*,void*),void*);
|
||||||
|
char *(*expanded_sql)(sqlite3_stmt*);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
** This is the function signature used for all extension entry points. It
|
||||||
|
** is also defined in the file "loadext.c".
|
||||||
|
*/
|
||||||
|
typedef int (*sqlite3_loadext_entry)(
|
||||||
|
sqlite3 *db, /* Handle to the database. */
|
||||||
|
char **pzErrMsg, /* Used to set error string on failure. */
|
||||||
|
const sqlite3_api_routines *pThunk /* Extension API function pointers. */
|
||||||
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** The following macros redefine the API routines so that they are
|
** The following macros redefine the API routines so that they are
|
||||||
** redirected through the global sqlite3_api structure.
|
** redirected through the global sqlite3_api structure.
|
||||||
|
@ -526,21 +537,24 @@ struct sqlite3_api_routines {
|
||||||
#define sqlite3_db_cacheflush sqlite3_api->db_cacheflush
|
#define sqlite3_db_cacheflush sqlite3_api->db_cacheflush
|
||||||
/* Version 3.12.0 and later */
|
/* Version 3.12.0 and later */
|
||||||
#define sqlite3_system_errno sqlite3_api->system_errno
|
#define sqlite3_system_errno sqlite3_api->system_errno
|
||||||
|
/* Version 3.14.0 and later */
|
||||||
|
#define sqlite3_trace_v2 sqlite3_api->trace_v2
|
||||||
|
#define sqlite3_expanded_sql sqlite3_api->expanded_sql
|
||||||
#endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
|
#endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
|
||||||
|
|
||||||
#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
|
#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
|
||||||
/* This case when the file really is being compiled as a loadable
|
/* This case when the file really is being compiled as a loadable
|
||||||
** extension */
|
** extension */
|
||||||
# define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api=0;
|
# define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api=0;
|
||||||
# define SQLITE_EXTENSION_INIT2(v) sqlite3_api=v;
|
# define SQLITE_EXTENSION_INIT2(v) sqlite3_api=v;
|
||||||
# define SQLITE_EXTENSION_INIT3 \
|
# define SQLITE_EXTENSION_INIT3 \
|
||||||
extern const sqlite3_api_routines *sqlite3_api;
|
extern const sqlite3_api_routines *sqlite3_api;
|
||||||
#else
|
#else
|
||||||
/* This case when the file is being statically linked into the
|
/* This case when the file is being statically linked into the
|
||||||
** application */
|
** application */
|
||||||
# define SQLITE_EXTENSION_INIT1 /*no-op*/
|
# define SQLITE_EXTENSION_INIT1 /*no-op*/
|
||||||
# define SQLITE_EXTENSION_INIT2(v) (void)v; /* unused parameter */
|
# define SQLITE_EXTENSION_INIT2(v) (void)v; /* unused parameter */
|
||||||
# define SQLITE_EXTENSION_INIT3 /*no-op*/
|
# define SQLITE_EXTENSION_INIT3 /*no-op*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* _SQLITE3EXT_H_ */
|
#endif /* SQLITE3EXT_H */
|
||||||
|
|
Loading…
Reference in New Issue