From: drh Date: Fri, 27 Aug 2010 18:44:54 +0000 (+0000) Subject: Make sqlite3_create_function() a special case of sqlite3_create_function_v2() X-Git-Tag: experimental~106 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7b19facf561fb3a886ee7e151c88a775c58b39e4;p=thirdparty%2Fsqlite.git Make sqlite3_create_function() a special case of sqlite3_create_function_v2() in order reduce the number of code paths and simplify testing. FossilOrigin-Name: 4758d86d57aaafc058c98c8b485eae24e6547588 --- diff --git a/manifest b/manifest index eba8174179..ff6fdebf92 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,8 @@ -C Add\sthe\ssqlite3_create_function_v2()\sAPI,\sa\sversion\sof\screate_function\sthat\sallows\sa\sdestructor\sto\sbe\sspecified. -D 2010-08-27T17:48:52 +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +C Make\ssqlite3_create_function()\sa\sspecial\scase\sof\ssqlite3_create_function_v2()\nin\sorder\sreduce\sthe\snumber\sof\scode\spaths\sand\ssimplify\stesting. +D 2010-08-27T18:44:55 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 543f91f24cd7fee774ecc0a61c19704c0c3e78fd F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -136,7 +139,7 @@ F src/journal.c 552839e54d1bf76fb8f7abe51868b66acacf6a0e F src/legacy.c a199d7683d60cef73089e892409113e69c23a99f F src/lempar.c 7f026423f4d71d989e719a743f98a1cbd4e6d99e F src/loadext.c 6d422ea91cf3d2d00408c5a8f2391cd458da85f8 -F src/main.c 185e558e8e38a36a78fdb36b378571f8fc136a7a +F src/main.c ce47368bf71e815ac7a484ca2e872ed3ed92f58c F src/malloc.c f34c9253326fcd2dad0041801992ccf18ddd6ab5 F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645 F src/mem1.c 89d4ea8d5cdd55635cbaa48ad53132af6294cbb2 @@ -848,7 +851,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P a3475ddfbe4526e6e0b334fd1376ee7c31508b80 -R ce2fe209cb36d8732f735448dc28c68e -U dan -Z 0f4ca6d40dff81bf94d3eaa37cf31103 +P 9a724dfbe822c77e76721abe3443c9cb018bb2e2 +R 9607aa96cd0cdc8bcb2114635902ff6c +U drh +Z f9a6877eb14f8e1dda2f51167504f9f2 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.6 (GNU/Linux) + +iD8DBQFMeAeqoxKgR168RlERAqqWAJ9hpff5bHcs4tXzdEHiUEvZACZNEgCfazU6 +NIzIv3Z2B+i1yILARX0ZbxM= +=/ORU +-----END PGP SIGNATURE----- diff --git a/manifest.uuid b/manifest.uuid index 7620966ab3..a9189be575 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -9a724dfbe822c77e76721abe3443c9cb018bb2e2 \ No newline at end of file +4758d86d57aaafc058c98c8b485eae24e6547588 \ No newline at end of file diff --git a/src/main.c b/src/main.c index 67733ee716..9d749ea84e 100644 --- a/src/main.c +++ b/src/main.c @@ -1055,12 +1055,8 @@ int sqlite3_create_function( void (*xStep)(sqlite3_context*,int,sqlite3_value **), void (*xFinal)(sqlite3_context*) ){ - int rc; - sqlite3_mutex_enter(db->mutex); - rc = sqlite3CreateFunc(db, zFunc, nArg, enc, p, xFunc, xStep, xFinal, 0); - rc = sqlite3ApiExit(db, rc); - sqlite3_mutex_leave(db->mutex); - return rc; + return sqlite3_create_function_v2(db, zFunc, nArg, enc, p, xFunc, xStep, + xFinal, 0); } int sqlite3_create_function_v2(