Skip to content

Commit cfb1df3

Browse files
author
Erlend Egeberg Aasland
authored
bpo-44991: Normalise function and collation callback naming (GH-28209)
1 parent b37dc9b commit cfb1df3

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

Modules/_sqlite/connection.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ set_sqlite_error(sqlite3_context *context, const char *msg)
667667
}
668668

669669
static void
670-
_pysqlite_func_callback(sqlite3_context *context, int argc, sqlite3_value **argv)
670+
func_callback(sqlite3_context *context, int argc, sqlite3_value **argv)
671671
{
672672
PyGILState_STATE threadstate = PyGILState_Ensure();
673673

@@ -908,7 +908,7 @@ pysqlite_connection_create_function_impl(pysqlite_Connection *self,
908908
return NULL;
909909
}
910910
rc = sqlite3_create_function_v2(self->db, name, narg, flags, ctx,
911-
_pysqlite_func_callback,
911+
func_callback,
912912
NULL,
913913
NULL,
914914
&destructor_callback); // will decref func
@@ -1501,10 +1501,8 @@ pysqlite_connection_executescript(pysqlite_Connection *self,
15011501
/* ------------------------- COLLATION CODE ------------------------ */
15021502

15031503
static int
1504-
pysqlite_collation_callback(
1505-
void* context,
1506-
int text1_length, const void* text1_data,
1507-
int text2_length, const void* text2_data)
1504+
collation_callback(void *context, int text1_length, const void *text1_data,
1505+
int text2_length, const void *text2_data)
15081506
{
15091507
PyGILState_STATE gilstate = PyGILState_Ensure();
15101508

@@ -1778,7 +1776,7 @@ pysqlite_connection_create_collation_impl(pysqlite_Connection *self,
17781776
return NULL;
17791777
}
17801778
rc = sqlite3_create_collation_v2(self->db, name, flags, ctx,
1781-
&pysqlite_collation_callback,
1779+
&collation_callback,
17821780
&destructor_callback);
17831781
}
17841782

0 commit comments

Comments
 (0)