/ Check-in [4758d86d]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Make sqlite3_create_function() a special case of sqlite3_create_function_v2() in order reduce the number of code paths and simplify testing.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4758d86d57aaafc058c98c8b485eae24e6547588
User & Date: drh 2010-08-27 18:44:55
Context
2010-08-28
18:58
Add code to allow user-defined searches of r-tree tables. Still largely untested. check-in: 782ca3b7 user: dan tags: trunk
2010-08-27
18:44
Make sqlite3_create_function() a special case of sqlite3_create_function_v2() in order reduce the number of code paths and simplify testing. check-in: 4758d86d user: drh tags: trunk
17:48
Add the sqlite3_create_function_v2() API, a version of create_function that allows a destructor to be specified. check-in: 9a724dfb user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/main.c.

  1051   1051     int nArg,
  1052   1052     int enc,
  1053   1053     void *p,
  1054   1054     void (*xFunc)(sqlite3_context*,int,sqlite3_value **),
  1055   1055     void (*xStep)(sqlite3_context*,int,sqlite3_value **),
  1056   1056     void (*xFinal)(sqlite3_context*)
  1057   1057   ){
  1058         -  int rc;
  1059         -  sqlite3_mutex_enter(db->mutex);
  1060         -  rc = sqlite3CreateFunc(db, zFunc, nArg, enc, p, xFunc, xStep, xFinal, 0);
  1061         -  rc = sqlite3ApiExit(db, rc);
  1062         -  sqlite3_mutex_leave(db->mutex);
  1063         -  return rc;
         1058  +  return sqlite3_create_function_v2(db, zFunc, nArg, enc, p, xFunc, xStep,
         1059  +                                    xFinal, 0);
  1064   1060   }
  1065   1061   
  1066   1062   int sqlite3_create_function_v2(
  1067   1063     sqlite3 *db,
  1068   1064     const char *zFunc,
  1069   1065     int nArg,
  1070   1066     int enc,