SQLite

Check-in [4758d86d57]
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
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4758d86d57aaafc058c98c8b485eae24e6547588
User & Date: drh 2010-08-27 18:44:55.000
Context
2010-08-28
18:58
Add code to allow user-defined searches of r-tree tables. Still largely untested. (check-in: 782ca3b716 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: 4758d86d57 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: 9a724dfbe8 user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/main.c.
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
  int nArg,
  int enc,
  void *p,
  void (*xFunc)(sqlite3_context*,int,sqlite3_value **),
  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;
}

int sqlite3_create_function_v2(
  sqlite3 *db,
  const char *zFunc,
  int nArg,
  int enc,







<
<
|
|
<
<







1051
1052
1053
1054
1055
1056
1057


1058
1059


1060
1061
1062
1063
1064
1065
1066
  int nArg,
  int enc,
  void *p,
  void (*xFunc)(sqlite3_context*,int,sqlite3_value **),
  void (*xStep)(sqlite3_context*,int,sqlite3_value **),
  void (*xFinal)(sqlite3_context*)
){


  return sqlite3_create_function_v2(db, zFunc, nArg, enc, p, xFunc, xStep,
                                    xFinal, 0);


}

int sqlite3_create_function_v2(
  sqlite3 *db,
  const char *zFunc,
  int nArg,
  int enc,