8000 bpo-41861, _sqlite3 : Add NEWS entry and rename variables (GH-23337) · python/cpython@2ffba2a · GitHub
[go: up one dir, main page]

Skip to content

Commit 2ffba2a

Browse files
author
Erlend Egeberg Aasland
authored
bpo-41861, _sqlite3 : Add NEWS entry and rename variables (GH-23337)
1 parent f03d318 commit 2ffba2a

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Convert :mod:`sqlite3` to use heap types (PEP 384).
2+
Patch by Erlend E. Aasland.

Modules/_sqlite/cache.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -258,17 +258,17 @@ PyObject* pysqlite_cache_display(pysqlite_Cache* self, PyObject* args)
258258
Py_RETURN_NONE;
259259
}
260260

261-
static PyType_Slot pysqlite_NodeType_slots[] = {
261+
static PyType_Slot node_slots[] = {
262262
{Py_tp_dealloc, pysqlite_node_dealloc},
263263
{Py_tp_new, PyType_GenericNew},
264264
{0, NULL},
265265
};
266266

267-
static PyType_Spec pysqlite_NodeType_spec = {
267+
static PyType_Spec node_spec = {
268268
.name = MODULE_NAME ".Node",
269269
.basicsize = sizeof(pysqlite_Node),
270270
.flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
271-
.slots = pysqlite_NodeType_slots,
271+
.slots = node_slots,
272272
};
273273
PyTypeObject *pysqlite_NodeType = NULL;
274274

@@ -280,30 +280,30 @@ static PyMethodDef cache_methods[] = {
280280
{NULL, NULL}
281281
};
282282

283-
static PyType_Slot pysqlite_CacheType_slots[] = {
283+
static PyType_Slot cache_slots[] = {
284284
{Py_tp_dealloc, pysqlite_cache_dealloc},
285285
{Py_tp_methods, cache_methods},
286286
{Py_tp_new, PyType_GenericNew},
287287
{Py_tp_init, pysqlite_cache_init},
288288
{0, NULL},
289289
};
290290

291-
static PyType_Spec pysqlite_CacheType_spec = {
291+
static PyType_Spec cache_spec = {
292292
.name = MODULE_NAME ".Cache",
293293
.basicsize = sizeof(pysqlite_Cache),
294294
.flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
295-
.slots = pysqlite_CacheType_slots,
295+
.slots = cache_slots,
296296
};
297297
PyTypeObject *pysqlite_CacheType = NULL;
298298

299299
extern int pysqlite_cache_setup_types(PyObject *mod)
300300
{
301-
pysqlite_NodeType = (PyTypeObject *)PyType_FromModuleAndSpec(mod, &pysqlite_NodeType_spec, NULL);
301+
pysqlite_NodeType = (PyTypeObject *)PyType_FromModuleAndSpec(mod, &node_spec, NULL);
302302
if (pysqlite_NodeType == NULL) {
303303
return -1;
304304
}
305305

306-
pysqlite_CacheType = (PyTypeObject *)PyType_FromModuleAndSpec(mod, &pysqlite_CacheType_spec, NULL);
306+
pysqlite_CacheType = (PyTypeObject *)PyType_FromModuleAndSpec(mod, &cache_spec, NULL);
307307
if (pysqlite_CacheType == NULL) {
308308
return -1;
309309
}

0 commit comments

Comments
 (0)
0