Skip to content

Commit e6f3f1d

Browse files
committed
Remove now redundant casts
The functions all take PyObject * (previous commit) so no need for the casts
1 parent deada95 commit e6f3f1d

9 files changed

Lines changed: 82 additions & 82 deletions

File tree

src/backup.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,10 @@ static PyMemberDef backup_members[] = {
373373

374374
static PyGetSetDef backup_getset[] = {
375375
/* name getter setter doc closure */
376-
{ "remaining", (getter)APSWBackup_get_remaining, NULL, Backup_remaining_DOC, NULL },
377-
{ "page_count", (getter)APSWBackup_get_page_count, NULL, Backup_page_count_DOC, NULL },
376+
{ "remaining", APSWBackup_get_remaining, NULL, Backup_remaining_DOC, NULL },
377+
{ "page_count", APSWBackup_get_page_count, NULL, Backup_page_count_DOC, NULL },
378378
#ifndef APSW_OMIT_OLD_NAMES
379-
{ Backup_page_count_OLDNAME, (getter)APSWBackup_get_page_count, NULL, Backup_page_count_OLDDOC, NULL },
379+
{ Backup_page_count_OLDNAME, APSWBackup_get_page_count, NULL, Backup_page_count_OLDDOC, NULL },
380380
#endif
381381
{ 0, 0, 0, 0, 0 }
382382
};
@@ -392,7 +392,7 @@ static PyMethodDef backup_methods[]
392392
static PyTypeObject APSWBackupType = {
393393
PyVarObject_HEAD_INIT(NULL, 0).tp_name = "apsw.Backup",
394394
.tp_basicsize = sizeof(APSWBackup),
395-
.tp_dealloc = (destructor)APSWBackup_dealloc,
395+
.tp_dealloc = APSWBackup_dealloc,
396396
.tp_flags = Py_TPFLAGS_DEFAULT,
397397
.tp_doc = Backup_class_DOC,
398398
.tp_weaklistoffset = offsetof(APSWBackup, weakreflist),

src/blob.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ static PyMethodDef APSWBlob_methods[] = {
702702
static PyTypeObject APSWBlobType = {
703703
PyVarObject_HEAD_INIT(NULL, 0).tp_name = "apsw.Blob",
704704
.tp_basicsize = sizeof(APSWBlob),
705-
.tp_dealloc = (destructor)APSWBlob_dealloc,
705+
.tp_dealloc = APSWBlob_dealloc,
706706
.tp_flags = Py_TPFLAGS_DEFAULT,
707707
.tp_doc = Blob_class_DOC,
708708
.tp_weaklistoffset = offsetof(APSWBlob, weakreflist),

src/connection.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2614,7 +2614,7 @@ Connection_load_extension(PyObject *self_, PyObject *const *fast_args, Py_ssize_
26142614
static PyTypeObject FunctionCBInfoType = {
26152615
PyVarObject_HEAD_INIT(NULL, 0).tp_name = "apsw.FunctionCBInfo",
26162616
.tp_basicsize = sizeof(FunctionCBInfo),
2617-
.tp_dealloc = (destructor)FunctionCBInfo_dealloc,
2617+
.tp_dealloc = FunctionCBInfo_dealloc,
26182618
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
26192619
.tp_doc = "FunctionCBInfo object",
26202620
};
@@ -5865,24 +5865,24 @@ Connection_register_fts5_function(PyObject *self_, PyObject *const *fast_args, P
58655865

58665866
static PyGetSetDef Connection_getseters[] = {
58675867
/* name getter setter doc closure */
5868-
{ "filename", (getter)Connection_getmainfilename, NULL, Connection_filename_DOC, NULL },
5869-
{ "filename_journal", (getter)Connection_getjournalfilename, NULL, Connection_filename_journal_DOC, NULL },
5870-
{ "filename_wal", (getter)Connection_getwalfilename, NULL, Connection_filename_wal_DOC, NULL },
5871-
{ "cursor_factory", (getter)Connection_get_cursor_factory, (setter)Connection_set_cursor_factory,
5868+
{ "filename", Connection_getmainfilename, NULL, Connection_filename_DOC, NULL },
5869+
{ "filename_journal", Connection_getjournalfilename, NULL, Connection_filename_journal_DOC, NULL },
5870+
{ "filename_wal", Connection_getwalfilename, NULL, Connection_filename_wal_DOC, NULL },
5871+
{ "cursor_factory", Connection_get_cursor_factory, Connection_set_cursor_factory,
58725872
Connection_cursor_factory_DOC, NULL },
5873-
{ "in_transaction", (getter)Connection_get_in_transaction, NULL, Connection_in_transaction_DOC },
5874-
{ "exec_trace", (getter)Connection_get_exec_trace_attr, (setter)Connection_set_exec_trace_attr,
5873+
{ "in_transaction", Connection_get_in_transaction, NULL, Connection_in_transaction_DOC },
5874+
{ "exec_trace", Connection_get_exec_trace_attr, Connection_set_exec_trace_attr,
58755875
Connection_exec_trace_DOC },
5876-
{ "row_trace", (getter)Connection_get_row_trace_attr, (setter)Connection_set_row_trace_attr,
5876+
{ "row_trace", Connection_get_row_trace_attr, Connection_set_row_trace_attr,
58775877
Connection_row_trace_DOC },
5878-
{ "authorizer", (getter)Connection_get_authorizer_attr, (setter)Connection_set_authorizer_attr,
5878+
{ "authorizer", Connection_get_authorizer_attr, Connection_set_authorizer_attr,
58795879
Connection_authorizer_DOC },
5880-
{ "system_errno", (getter)Connection_get_system_errno, NULL, Connection_system_errno_DOC },
5881-
{ "is_interrupted", (getter)Connection_is_interrupted, NULL, Connection_is_interrupted_DOC },
5880+
{ "system_errno", Connection_get_system_errno, NULL, Connection_system_errno_DOC },
5881+
{ "is_interrupted", Connection_is_interrupted, NULL, Connection_is_interrupted_DOC },
58825882
#ifndef APSW_OMIT_OLD_NAMES
5883-
{ Connection_exec_trace_OLDNAME, (getter)Connection_get_exec_trace_attr, (setter)Connection_set_exec_trace_attr,
5883+
{ Connection_exec_trace_OLDNAME, Connection_get_exec_trace_attr, Connection_set_exec_trace_attr,
58845884
Connection_exec_trace_OLDDOC },
5885-
{ Connection_row_trace_OLDNAME, (getter)Connection_get_row_trace_attr, (setter)Connection_set_row_trace_attr,
5885+
{ Connection_row_trace_OLDNAME, Connection_get_row_trace_attr, Connection_set_row_trace_attr,
58865886
Connection_row_trace_OLDDOC },
58875887
#endif
58885888
/* Sentinel */

src/cursor.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1927,32 +1927,32 @@ static PyMethodDef APSWCursor_methods[] = {
19271927
};
19281928

19291929
static PyGetSetDef APSWCursor_getset[]
1930-
= { { "description", (getter)APSWCursor_getdescription_dbapi, NULL, Cursor_description_DOC, NULL },
1930+
= { { "description", APSWCursor_getdescription_dbapi, NULL, Cursor_description_DOC, NULL },
19311931
#ifdef SQLITE_ENABLE_COLUMN_METADATA
1932-
{ "description_full", (getter)APSWCursor_get_description_full, NULL, Cursor_description_full_DOC, NULL },
1932+
{ "description_full", APSWCursor_get_description_full, NULL, Cursor_description_full_DOC, NULL },
19331933
#endif
1934-
{ "is_explain", (getter)APSWCursor_is_explain, NULL, Cursor_is_explain_DOC, NULL },
1935-
{ "is_readonly", (getter)APSWCursor_is_readonly, NULL, Cursor_is_readonly_DOC, NULL },
1936-
{ "has_vdbe", (getter)APSWCursor_has_vdbe, NULL, Cursor_has_vdbe_DOC, NULL },
1937-
{ "bindings_count", (getter)APSWCursor_bindings_count, NULL, Cursor_bindings_count_DOC, NULL },
1938-
{ "bindings_names", (getter)APSWCursor_bindings_names, NULL, Cursor_bindings_names_DOC, NULL },
1939-
{ "expanded_sql", (getter)APSWCursor_expanded_sql, NULL, Cursor_expanded_sql_DOC, NULL },
1940-
{ "exec_trace", (getter)APSWCursor_get_exec_trace_attr, (setter)APSWCursor_set_exec_trace_attr,
1934+
{ "is_explain", APSWCursor_is_explain, NULL, Cursor_is_explain_DOC, NULL },
1935+
{ "is_readonly", APSWCursor_is_readonly, NULL, Cursor_is_readonly_DOC, NULL },
1936+
{ "has_vdbe", APSWCursor_has_vdbe, NULL, Cursor_has_vdbe_DOC, NULL },
1937+
{ "bindings_count", APSWCursor_bindings_count, NULL, Cursor_bindings_count_DOC, NULL },
1938+
{ "bindings_names", APSWCursor_bindings_names, NULL, Cursor_bindings_names_DOC, NULL },
1939+
{ "expanded_sql", APSWCursor_expanded_sql, NULL, Cursor_expanded_sql_DOC, NULL },
1940+
{ "exec_trace", APSWCursor_get_exec_trace_attr, APSWCursor_set_exec_trace_attr,
19411941
Cursor_exec_trace_DOC },
1942-
{ Cursor_exec_trace_OLDNAME, (getter)APSWCursor_get_exec_trace_attr, (setter)APSWCursor_set_exec_trace_attr,
1942+
{ Cursor_exec_trace_OLDNAME, APSWCursor_get_exec_trace_attr, APSWCursor_set_exec_trace_attr,
19431943
Cursor_exec_trace_OLDDOC },
1944-
{ "row_trace", (getter)APSWCursor_get_row_trace_attr, (setter)APSWCursor_set_row_trace_attr,
1944+
{ "row_trace", APSWCursor_get_row_trace_attr, APSWCursor_set_row_trace_attr,
19451945
Cursor_row_trace_DOC },
1946-
{ Cursor_row_trace_OLDNAME, (getter)APSWCursor_get_row_trace_attr, (setter)APSWCursor_set_row_trace_attr,
1946+
{ Cursor_row_trace_OLDNAME, APSWCursor_get_row_trace_attr, APSWCursor_set_row_trace_attr,
19471947
Cursor_row_trace_OLDDOC },
1948-
{ "connection", (getter)APSWCursor_get_connection_attr, NULL, Cursor_connection_DOC },
1949-
{ "get", (getter)APSWCursor_get, NULL, Cursor_get_DOC },
1948+
{ "connection", APSWCursor_get_connection_attr, NULL, Cursor_connection_DOC },
1949+
{ "get", APSWCursor_get, NULL, Cursor_get_DOC },
19501950
{ NULL, NULL, NULL, NULL, NULL } };
19511951

19521952
static PyTypeObject APSWCursorType = {
19531953
PyVarObject_HEAD_INIT(NULL, 0).tp_name = "apsw.Cursor",
19541954
.tp_basicsize = sizeof(APSWCursor),
1955-
.tp_dealloc = (destructor)APSWCursor_dealloc,
1955+
.tp_dealloc = APSWCursor_dealloc,
19561956
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC,
19571957
.tp_doc = Cursor_class_DOC,
19581958
.tp_traverse = (traverseproc)APSWCursor_tp_traverse,
@@ -1992,7 +1992,7 @@ static PyTypeObject PyObjectBindType = {
19921992
.tp_basicsize = sizeof(PyObjectBind),
19931993
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
19941994
.tp_init = (initproc)PyObjectBind_init,
1995-
.tp_finalize = (destructor)PyObjectBind_finalize,
1995+
.tp_finalize = PyObjectBind_finalize,
19961996
.tp_new = PyType_GenericNew,
19971997
.tp_doc = Apsw_pyobject_DOC,
19981998
};

src/fts.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,9 @@ APSWFTS5Tokenizer_dealloc(PyObject *self_)
362362
}
363363

364364
static PyGetSetDef APSWFTS5Tokenizer_getset[] = {
365-
{ "connection", (getter)APSWFTS5Tokenizer_connection, NULL, FTS5Tokenizer_connection_DOC },
366-
{ "args", (getter)APSWFTS5Tokenizer_args, NULL, FTS5Tokenizer_args_DOC },
367-
{ "name", (getter)APSWFTS5Tokenizer_name, NULL, FTS5Tokenizer_name_DOC },
365+
{ "connection", APSWFTS5Tokenizer_connection, NULL, FTS5Tokenizer_connection_DOC },
366+
{ "args", APSWFTS5Tokenizer_args, NULL, FTS5Tokenizer_args_DOC },
367+
{ "name", APSWFTS5Tokenizer_name, NULL, FTS5Tokenizer_name_DOC },
368368
{ 0 },
369369
};
370370

@@ -376,7 +376,7 @@ static PyTypeObject APSWFTS5TokenizerType = {
376376
.tp_doc = FTS5Tokenizer_class_DOC,
377377
.tp_basicsize = sizeof(APSWFTS5Tokenizer),
378378
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_VECTORCALL,
379-
.tp_dealloc = (destructor)APSWFTS5Tokenizer_dealloc,
379+
.tp_dealloc = APSWFTS5Tokenizer_dealloc,
380380
.tp_call = PyVectorcall_Call,
381381
.tp_vectorcall_offset = offsetof(APSWFTS5Tokenizer, vectorcall),
382382
.tp_getset = APSWFTS5Tokenizer_getset,
@@ -1419,14 +1419,14 @@ APSWFTS5ExtensionApi_xQueryPhrase(PyObject *self, PyObject *const *fast_args, Py
14191419
#undef EXTFTS
14201420

14211421
static PyGetSetDef APSWFTS5ExtensionApi_getset[] = {
1422-
{ "phrase_count", (getter)APSWFTS5ExtensionApi_xPhraseCount, NULL, FTS5ExtensionApi_phrase_count_DOC },
1423-
{ "column_count", (getter)APSWFTS5ExtensionApi_xColumnCount, NULL, FTS5ExtensionApi_column_count_DOC },
1424-
{ "row_count", (getter)APSWFTS5ExtensionApi_xRowCount, NULL, FTS5ExtensionApi_row_count_DOC },
1425-
{ "aux_data", (getter)APSWFTS5ExtensionApi_xGetAuxdata, (setter)APSWFTS5ExtensionApi_xSetAuxdata,
1422+
{ "phrase_count", APSWFTS5ExtensionApi_xPhraseCount, NULL, FTS5ExtensionApi_phrase_count_DOC },
1423+
{ "column_count", APSWFTS5ExtensionApi_xColumnCount, NULL, FTS5ExtensionApi_column_count_DOC },
1424+
{ "row_count", APSWFTS5ExtensionApi_xRowCount, NULL, FTS5ExtensionApi_row_count_DOC },
1425+
{ "aux_data", APSWFTS5ExtensionApi_xGetAuxdata, APSWFTS5ExtensionApi_xSetAuxdata,
14261426
FTS5ExtensionApi_aux_data_DOC },
1427-
{ "rowid", (getter)APSWFTS5ExtensionApi_xRowid, NULL, FTS5ExtensionApi_rowid_DOC },
1428-
{ "phrases", (getter)APSWFTS5ExtensionApi_phrases, NULL, FTS5ExtensionApi_phrases_DOC },
1429-
{ "inst_count", (getter)APSWFTS5ExtensionApi_xInstCount, NULL, FTS5ExtensionApi_inst_count_DOC },
1427+
{ "rowid", APSWFTS5ExtensionApi_xRowid, NULL, FTS5ExtensionApi_rowid_DOC },
1428+
{ "phrases", APSWFTS5ExtensionApi_phrases, NULL, FTS5ExtensionApi_phrases_DOC },
1429+
{ "inst_count", APSWFTS5ExtensionApi_xInstCount, NULL, FTS5ExtensionApi_inst_count_DOC },
14301430
{ 0 },
14311431
};
14321432

src/session.c

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2271,11 +2271,11 @@ static PyMethodDef APSWSession_methods[] = {
22712271
};
22722272

22732273
static PyGetSetDef APSWSession_getset[] = {
2274-
{ "enabled", (getter)APSWSession_get_enabled, (setter)APSWSession_set_enabled, Session_enabled_DOC },
2275-
{ "indirect", (getter)APSWSession_get_indirect, (setter)APSWSession_set_indirect, Session_indirect_DOC },
2276-
{ "is_empty", (getter)APSWSession_get_empty, NULL, Session_is_empty_DOC },
2277-
{ "memory_used", (getter)APSWSession_get_memory_used, NULL, Session_memory_used_DOC },
2278-
{ "changeset_size", (getter)APSWSession_get_changeset_size, NULL, Session_changeset_size_DOC },
2274+
{ "enabled", APSWSession_get_enabled, APSWSession_set_enabled, Session_enabled_DOC },
2275+
{ "indirect", APSWSession_get_indirect, APSWSession_set_indirect, Session_indirect_DOC },
2276+
{ "is_empty", APSWSession_get_empty, NULL, Session_is_empty_DOC },
2277+
{ "memory_used", APSWSession_get_memory_used, NULL, Session_memory_used_DOC },
2278+
{ "changeset_size", APSWSession_get_changeset_size, NULL, Session_changeset_size_DOC },
22792279
{ 0 },
22802280
};
22812281

@@ -2285,7 +2285,7 @@ static PyTypeObject APSWSessionType = {
22852285
.tp_doc = Session_class_DOC,
22862286
.tp_new = PyType_GenericNew,
22872287
.tp_init = (initproc)APSWSession_init,
2288-
.tp_dealloc = (destructor)APSWSession_dealloc,
2288+
.tp_dealloc = APSWSession_dealloc,
22892289
.tp_methods = APSWSession_methods,
22902290
.tp_getset = APSWSession_getset,
22912291
.tp_flags = Py_TPFLAGS_BASETYPE | Py_TPFLAGS_DEFAULT,
@@ -2314,7 +2314,7 @@ static PyTypeObject APSWChangesetType = {
23142314
static PyTypeObject APSWChangesetIteratorType = {
23152315
PyVarObject_HEAD_INIT(NULL, 0).tp_name = "apsw.ChangesetIterator", .tp_basicsize = sizeof(APSWChangesetIterator),
23162316
.tp_iternext = (iternextfunc)APSWChangesetIterator_next, .tp_iter = APSWChangesetIterator_iter,
2317-
.tp_dealloc = (destructor)APSWChangesetIterator_dealloc,
2317+
.tp_dealloc = APSWChangesetIterator_dealloc,
23182318
};
23192319

23202320
static PyMethodDef APSWChangesetBuilder_methods[] = {
@@ -2335,22 +2335,22 @@ static PyTypeObject APSWChangesetBuilderType = {
23352335
.tp_methods = APSWChangesetBuilder_methods,
23362336
.tp_new = PyType_GenericNew,
23372337
.tp_init = (initproc)APSWChangesetBuilder_init,
2338-
.tp_dealloc = (destructor)APSWChangesetBuilder_dealloc,
2338+
.tp_dealloc = APSWChangesetBuilder_dealloc,
23392339
.tp_doc = ChangesetBuilder_class_DOC,
23402340
.tp_weaklistoffset = offsetof(APSWChangesetBuilder, weakreflist),
23412341
};
23422342

23432343
static PyGetSetDef APSWTableChange_getset[] = {
2344-
{ "name", (getter)APSWTableChange_name, NULL, TableChange_name_DOC },
2345-
{ "column_count", (getter)APSWTableChange_column_count, NULL, TableChange_column_count_DOC },
2346-
{ "op", (getter)APSWTableChange_op, NULL, TableChange_op_DOC },
2347-
{ "opcode", (getter)APSWTableChange_opcode, NULL, TableChange_opcode_DOC },
2348-
{ "indirect", (getter)APSWTableChange_indirect, NULL, TableChange_indirect_DOC },
2349-
{ "old", (getter)APSWTableChange_old, NULL, TableChange_old_DOC },
2350-
{ "new", (getter)APSWTableChange_new, NULL, TableChange_new_DOC },
2351-
{ "conflict", (getter)APSWTableChange_conflict, NULL, TableChange_conflict_DOC },
2352-
{ "fk_conflicts", (getter)APSWTableChange_fk_conflicts, NULL, TableChange_fk_conflicts_DOC },
2353-
{ "pk_columns", (getter)APSWTableChange_pk_columns, NULL, TableChange_pk_columns_DOC },
2344+
{ "name", APSWTableChange_name, NULL, TableChange_name_DOC },
2345+
{ "column_count", APSWTableChange_column_count, NULL, TableChange_column_count_DOC },
2346+
{ "op", APSWTableChange_op, NULL, TableChange_op_DOC },
2347+
{ "opcode", APSWTableChange_opcode, NULL, TableChange_opcode_DOC },
2348+
{ "indirect", APSWTableChange_indirect, NULL, TableChange_indirect_DOC },
2349+
{ "old", APSWTableChange_old, NULL, TableChange_old_DOC },
2350+
{ "new", APSWTableChange_new, NULL, TableChange_new_DOC },
2351+
{ "conflict", APSWTableChange_conflict, NULL, TableChange_conflict_DOC },
2352+
{ "fk_conflicts", APSWTableChange_fk_conflicts, NULL, TableChange_fk_conflicts_DOC },
2353+
{ "pk_columns", APSWTableChange_pk_columns, NULL, TableChange_pk_columns_DOC },
23542354
{ 0 },
23552355
};
23562356

@@ -2359,7 +2359,7 @@ static PyTypeObject APSWTableChangeType = {
23592359
.tp_basicsize = sizeof(APSWTableChange),
23602360
.tp_getset = APSWTableChange_getset,
23612361
.tp_doc = TableChange_class_DOC,
2362-
.tp_dealloc = (destructor)APSWTableChange_dealloc,
2362+
.tp_dealloc = APSWTableChange_dealloc,
23632363
.tp_str = (reprfunc)APSWTableChange_tp_str,
23642364
};
23652365

@@ -2378,5 +2378,5 @@ static PyTypeObject APSWRebaserType = {
23782378
.tp_methods = APSWRebaser_methods,
23792379
.tp_new = PyType_GenericNew,
23802380
.tp_init = (initproc)APSWRebaser_init,
2381-
.tp_dealloc = (destructor)APSWRebaser_dealloc,
2381+
.tp_dealloc = APSWRebaser_dealloc,
23822382
};

src/unicode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2528,7 +2528,7 @@ static PyMethodDef OffsetMapper_methods[] = {
25282528
};
25292529

25302530
static PyGetSetDef OffsetMapper_getset[] = {
2531-
{ "text", (getter)OffsetMapper_text, NULL, "resulting text" },
2531+
{ "text", OffsetMapper_text, NULL, "resulting text" },
25322532
{ NULL },
25332533
};
25342534

src/vfs.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,10 @@ apswfcntl_pragma_get_value(PyObject *self, void *Py_UNUSED(unused))
182182
}
183183

184184
static PyGetSetDef apswfcntl_pragma_getsetters[]
185-
= { { "result", (getter)apswfcntl_pragma_get_result, (setter)apswfcntl_pragma_set_result,
185+
= { { "result", apswfcntl_pragma_get_result, apswfcntl_pragma_set_result,
186186
VFSFcntlPragma_result_DOC },
187-
{ "name", (getter)apswfcntl_pragma_get_name, NULL, VFSFcntlPragma_name_DOC },
188-
{ "value", (getter)apswfcntl_pragma_get_value, NULL, VFSFcntlPragma_value_DOC },
187+
{ "name", apswfcntl_pragma_get_name, NULL, VFSFcntlPragma_name_DOC },
188+
{ "value", apswfcntl_pragma_get_value, NULL, VFSFcntlPragma_value_DOC },
189189
/* sentinel */
190190
{ NULL, NULL, NULL, NULL } };
191191

@@ -1963,7 +1963,7 @@ static PyMethodDef APSWVFS_methods[] = {
19631963
static PyTypeObject APSWVFSType = {
19641964
PyVarObject_HEAD_INIT(NULL, 0).tp_name = "apsw.VFS",
19651965
.tp_basicsize = sizeof(APSWVFS),
1966-
.tp_dealloc = (destructor)APSWVFS_dealloc,
1966+
.tp_dealloc = APSWVFS_dealloc,
19671967
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
19681968
.tp_doc = VFS_class_DOC,
19691969
.tp_methods = APSWVFS_methods,
@@ -3135,7 +3135,7 @@ static PyMethodDef APSWVFSFile_methods[] = {
31353135
static PyTypeObject APSWVFSFileType = {
31363136
PyVarObject_HEAD_INIT(NULL, 0).tp_name = "apsw.VFSFile",
31373137
.tp_basicsize = sizeof(APSWVFSFile),
3138-
.tp_dealloc = (destructor)APSWVFSFile_dealloc,
3138+
.tp_dealloc = APSWVFSFile_dealloc,
31393139
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
31403140
.tp_doc = VFSFile_class_DOC,
31413141
.tp_methods = APSWVFSFile_methods,
@@ -3318,7 +3318,7 @@ static PyMethodDef APSWURIFilenameMethods[]
33183318
{ 0, 0, 0, 0 } };
33193319

33203320
static PyGetSetDef APSWURIFilename_getset[] = {
3321-
{ "parameters", (getter)apswurifilename_parameters, NULL, URIFilename_parameters_DOC },
3321+
{ "parameters", apswurifilename_parameters, NULL, URIFilename_parameters_DOC },
33223322
{ 0, 0, 0, 0 },
33233323
};
33243324

src/vtable.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -723,20 +723,20 @@ SqliteIndexInfo_get_distinct(PyObject *self, void *Py_UNUSED(unused))
723723
}
724724

725725
static PyGetSetDef SqliteIndexInfo_getsetters[]
726-
= { { "nConstraint", (getter)SqliteIndexInfo_get_nConstraint, NULL, IndexInfo_nConstraint_DOC },
727-
{ "nOrderBy", (getter)SqliteIndexInfo_get_nOrderBy, NULL, IndexInfo_nOrderBy_DOC },
728-
{ "idxNum", (getter)SqliteIndexInfo_get_idxNum, (setter)SqliteIndexInfo_set_idxNum, IndexInfo_idxNum_DOC },
729-
{ "idxStr", (getter)SqliteIndexInfo_get_idxStr, (setter)SqliteIndexInfo_set_idxStr, IndexInfo_idxStr_DOC },
730-
{ "orderByConsumed", (getter)SqliteIndexInfo_get_orderByConsumed, (setter)SqliteIndexInfo_set_OrderByConsumed,
726+
= { { "nConstraint", SqliteIndexInfo_get_nConstraint, NULL, IndexInfo_nConstraint_DOC },
727+
{ "nOrderBy", SqliteIndexInfo_get_nOrderBy, NULL, IndexInfo_nOrderBy_DOC },
728+
{ "idxNum", SqliteIndexInfo_get_idxNum, SqliteIndexInfo_set_idxNum, IndexInfo_idxNum_DOC },
729+
{ "idxStr", SqliteIndexInfo_get_idxStr, SqliteIndexInfo_set_idxStr, IndexInfo_idxStr_DOC },
730+
{ "orderByConsumed", SqliteIndexInfo_get_orderByConsumed, SqliteIndexInfo_set_OrderByConsumed,
731731
IndexInfo_orderByConsumed_DOC },
732-
{ "estimatedCost", (getter)SqliteIndexInfo_get_estimatedCost, (setter)SqliteIndexInfo_set_estimatedCost,
732+
{ "estimatedCost", SqliteIndexInfo_get_estimatedCost, SqliteIndexInfo_set_estimatedCost,
733733
IndexInfo_estimatedCost_DOC },
734-
{ "estimatedRows", (getter)SqliteIndexInfo_get_estimatedRows, (setter)SqliteIndexInfo_set_estimatedRows,
734+
{ "estimatedRows", SqliteIndexInfo_get_estimatedRows, SqliteIndexInfo_set_estimatedRows,
735735
IndexInfo_estimatedRows_DOC },
736-
{ "idxFlags", (getter)SqliteIndexInfo_get_idxFlags, (setter)SqliteIndexInfo_set_idxFlags,
736+
{ "idxFlags", SqliteIndexInfo_get_idxFlags, SqliteIndexInfo_set_idxFlags,
737737
IndexInfo_idxFlags_DOC },
738-
{ "colUsed", (getter)SqliteIndexInfo_get_colUsed, NULL, IndexInfo_colUsed_DOC },
739-
{ "distinct", (getter)SqliteIndexInfo_get_distinct, NULL, IndexInfo_distinct_DOC },
738+
{ "colUsed", SqliteIndexInfo_get_colUsed, NULL, IndexInfo_colUsed_DOC },
739+
{ "distinct", SqliteIndexInfo_get_distinct, NULL, IndexInfo_distinct_DOC },
740740
/* sentinel */
741741
{ NULL, NULL, NULL, NULL } };
742742

0 commit comments

Comments
 (0)