From: dan Date: Fri, 9 Jul 2021 11:52:53 +0000 (+0000) Subject: Add the usual "#ifdef __cplusplus" magic to header file ext/misc/carray.h. Also updat... X-Git-Tag: version-3.37.0~344 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f33e7795b3905b3dd278d5ec5c777af7a348dcd7;p=thirdparty%2Fsqlite.git Add the usual "#ifdef __cplusplus" magic to header file ext/misc/carray.h. Also update carray.h/carray.c to use SQLITE_API in the usual way. FossilOrigin-Name: 0f97c2a459bfadc2fe19e710e8845039b4434010656d311074b9594b02d0826a --- diff --git a/ext/misc/carray.c b/ext/misc/carray.c index b8cda21bc7..43d714689c 100644 --- a/ext/misc/carray.c +++ b/ext/misc/carray.c @@ -56,14 +56,24 @@ SQLITE_EXTENSION_INIT1 #include #include - + /* Allowed values for the mFlags parameter to sqlite3_carray_bind(). ** Must exactly match the definitions in carray.h. */ -#define CARRAY_INT32 0 /* Data is 32-bit signed integers */ -#define CARRAY_INT64 1 /* Data is 64-bit signed integers */ -#define CARRAY_DOUBLE 2 /* Data is doubles */ -#define CARRAY_TEXT 3 /* Data is char* */ +#ifndef CARRAY_INT32 +# define CARRAY_INT32 0 /* Data is 32-bit signed integers */ +# define CARRAY_INT64 1 /* Data is 64-bit signed integers */ +# define CARRAY_DOUBLE 2 /* Data is doubles */ +# define CARRAY_TEXT 3 /* Data is char* */ +#endif + +#ifndef SQLITE_API +# ifdef _WIN32 +# define SQLITE_API __declspec(dllexport) +# else +# define SQLITE_API +# endif +#endif #ifndef SQLITE_OMIT_VIRTUALTABLE @@ -400,10 +410,7 @@ static void carrayBindDel(void *pPtr){ ** Invoke this interface in order to bind to the single-argument ** version of CARRAY(). */ -#ifdef _WIN32 -__declspec(dllexport) -#endif -int sqlite3_carray_bind( +SQLITE_API int sqlite3_carray_bind( sqlite3_stmt *pStmt, int idx, void *aData, @@ -498,10 +505,7 @@ static void inttoptrFunc( #endif /* SQLITE_OMIT_VIRTUALTABLE */ -#ifdef _WIN32 -__declspec(dllexport) -#endif -int sqlite3_carray_init( +SQLITE_API int sqlite3_carray_init( sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi diff --git a/ext/misc/carray.h b/ext/misc/carray.h index e490bf24cd..63df0066b5 100644 --- a/ext/misc/carray.h +++ b/ext/misc/carray.h @@ -1,12 +1,32 @@ /* +** 2020-11-17 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +** ** Interface definitions for the CARRAY table-valued function ** extension. */ +#ifndef _CARRAY_H +#define _CARRAY_H + +#include "sqlite3.h" /* Required for error code definitions */ + +#ifdef __cplusplus +extern "C" { +#endif + /* Use this interface to bind an array to the single-argument version ** of CARRAY(). */ -int sqlite3_carray_bind( +SQLITE_API int sqlite3_carray_bind( sqlite3_stmt *pStmt, /* Statement to be bound */ int i, /* Parameter index */ void *aData, /* Pointer to array data */ @@ -21,3 +41,10 @@ int sqlite3_carray_bind( #define CARRAY_INT64 1 /* Data is 64-bit signed integers */ #define CARRAY_DOUBLE 2 /* Data is doubles */ #define CARRAY_TEXT 3 /* Data is char* */ + +#ifdef __cplusplus +} /* end of the 'extern "C"' block */ +#endif + +#endif /* ifndef _CARRAY_H */ + diff --git a/manifest b/manifest index 37dbcf347e..5254c5394e 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Allow\sCLI\sshell\sbuild\sto\s#include\ssame\suser-specified\sheader\sas\slibrary\sbuild. -D 2021-07-09T00:12:05.614 +C Add\sthe\susual\s"#ifdef\s__cplusplus"\smagic\sto\sheader\sfile\sext/misc/carray.h.\sAlso\supdate\scarray.h/carray.c\sto\suse\sSQLITE_API\sin\sthe\susual\sway. +D 2021-07-09T11:52:53.967 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -289,8 +289,8 @@ F ext/misc/anycollseq.c 5ffdfde9829eeac52219136ad6aa7cd9a4edb3b15f4f2532de52f4a2 F ext/misc/appendvfs.c 9642c7a194a2a25dca7ad3e36af24a0a46d7702168c4ad7e59c9f9b0e16a3824 F ext/misc/blobio.c a867c4c4617f6ec223a307ebfe0eabb45e0992f74dd47722b96f3e631c0edb2a F ext/misc/btreeinfo.c d28ce349b40054eaa9473e835837bad7a71deec33ba13e39f963d50933bfa0f9 -F ext/misc/carray.c b75a0f207391038bf1540d3372f482a95c3613511c7c474db51ede1196321c7c -F ext/misc/carray.h de74ac70b2338f416723f7d538026e8ec0b7f1d388319f8f140c9a4d7677f02e +F ext/misc/carray.c af9c4b3de67f87eb00644c3bb874b77e5917422b8d2c3ffc2853a118668501fa +F ext/misc/carray.h d2b1b12486d531367c37832d3d0dad34eea4bdd83ed839d445521ef01f0bc4e3 F ext/misc/cksumvfs.c b42ef52eaaa510d54ec320c87bea149e934a3b06cd232be2093562bf669bd572 F ext/misc/closure.c dbfd8543b2a017ae6b1a5843986b22ddf99ff126ec9634a2f4047cd14c85c243 F ext/misc/completion.c 6dafd7f4348eecc7be9e920d4b419d1fb2af75d938cd9c59a20cfe8beb2f22b9 @@ -1920,7 +1920,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 060aec37accae858ced5b081a2ff76dccdd8f8bcefc63d1fe2e7478257c69e76 -R 50583abc677d1e775bb177169ec30e48 -U larrybr -Z c9015fea980b646abec4bd4e9aaa109a +P eb8af9a494fb68c0a1c600b3ac71467645b51b296fc6e2116d7d855319d59a59 +R 4921ff9c6662da771dcaa161286cae4d +U dan +Z a202a1f73cdb865aaa148dd68fbda945 diff --git a/manifest.uuid b/manifest.uuid index 6ea12ee95b..ff5ad7c1a3 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -eb8af9a494fb68c0a1c600b3ac71467645b51b296fc6e2116d7d855319d59a59 \ No newline at end of file +0f97c2a459bfadc2fe19e710e8845039b4434010656d311074b9594b02d0826a \ No newline at end of file