Skip to content

bpo-44991: Normalise sqlite3 function and collation callback naming #28209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions Modules/_sqlite/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ set_sqlite_error(sqlite3_context *context, const char *msg)
}

static void
_pysqlite_func_callback(sqlite3_context *context, int argc, sqlite3_value **argv)
func_callback(sqlite3_context *context, int argc, sqlite3_value **argv)
{
PyGILState_STATE threadstate = PyGILState_Ensure();

Expand Down Expand Up @@ -901,7 +901,7 @@ pysqlite_connection_create_function_impl(pysqlite_Connection *self,
return NULL;
}
rc = sqlite3_create_function_v2(self->db, name, narg, flags, ctx,
_pysqlite_func_callback,
func_callback,
NULL,
NULL,
&destructor_callback); // will decref func
Expand Down Expand Up @@ -1494,10 +1494,8 @@ pysqlite_connection_executescript(pysqlite_Connection *self,
/* ------------------------- COLLATION CODE ------------------------ */

static int
pysqlite_collation_callback(
void* context,
int text1_length, const void* text1_data,
int text2_length, const void* text2_data)
collation_callback(void *context, int text1_length, const void *text1_data,
int text2_length, const void *text2_data)
{
PyGILState_STATE gilstate = PyGILState_Ensure();

Expand Down Expand Up @@ -1771,7 +1769,7 @@ pysqlite_connection_create_collation_impl(pysqlite_Connection *self,
return NULL;
}
rc = sqlite3_create_collation_v2(self->db, name, flags, ctx,
&pysqlite_collation_callback,
&collation_callback,
&destructor_callback);
}

Expand Down