diff options
author | Victor Stinner <vstinner@python.org> | 2025-02-26 20:35:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-26 20:35:24 (GMT) |
commit | 1b635d86cd0714871ebef91f2f89634ee340e28c (patch) | |
tree | fc0e99848ab574c5f45db3ed952cc539bb02a006 /Python | |
parent | 3f3e1c4095ae229b0c6d0364f289a20732281a96 (diff) | |
download | cpython-1b635d86cd0714871ebef91f2f89634ee340e28c.zip cpython-1b635d86cd0714871ebef91f2f89634ee340e28c.tar.gz cpython-1b635d86cd0714871ebef91f2f89634ee340e28c.tar.bz2 |
gh-111178: Fix function signatures in symtable.c (#130589)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/symtable.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Python/symtable.c b/Python/symtable.c index 8735761..4d6384f 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -163,15 +163,17 @@ ste_new(struct symtable *st, identifier name, _Py_block_ty block, } static PyObject * -ste_repr(PySTEntryObject *ste) +ste_repr(PyObject *op) { + PySTEntryObject *ste = (PySTEntryObject *)op; return PyUnicode_FromFormat("<symtable entry %U(%R), line %d>", ste->ste_name, ste->ste_id, ste->ste_loc.lineno); } static void -ste_dealloc(PySTEntryObject *ste) +ste_dealloc(PyObject *op) { + PySTEntryObject *ste = (PySTEntryObject *)op; ste->ste_table = NULL; Py_XDECREF(ste->ste_id); Py_XDECREF(ste->ste_name); @@ -203,12 +205,12 @@ PyTypeObject PySTEntry_Type = { "symtable entry", sizeof(PySTEntryObject), 0, - (destructor)ste_dealloc, /* tp_dealloc */ - 0, /* tp_vectorcall_offset */ - 0, /* tp_getattr */ + ste_dealloc, /* tp_dealloc */ + 0, /* tp_vectorcall_offset */ + 0, /* tp_getattr */ 0, /* tp_setattr */ 0, /* tp_as_async */ - (reprfunc)ste_repr, /* tp_repr */ + ste_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ |