8000 bpo-33012: Add _Py_CAST_FUNC() to cast function ptr by vstinner · Pull Request #10744 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-33012: Add _Py_CAST_FUNC() to cast function ptr #10744

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions Include/pyport.h
Original file line number Diff line number Diff line change
Expand Up @@ -792,4 +792,9 @@ extern _invalid_parameter_handler _Py_silent_invalid_parameter_handler;
#define WITH_THREAD
#endif

/* Cast a function pointer to new_type.

Use a temporary cast to (void*) see avoid compiler warning (bpo-33012). */
#define _Py_CAST_FUNC(new_type, func) ((new_type)(void *)(func))

#endif /* Py_PYPORT_H */
32 changes: 16 additions & 16 deletions Modules/_asynciomodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1398,16 +1398,16 @@ static PyMethodDef FutureType_methods[] = {
};

#define FUTURE_COMMON_GETSETLIST \
{"_state", (getter)FutureObj_get_state, NULL, NULL}, \
{"_asyncio_future_blocking", (getter)FutureObj_get_blocking, \
(setter)FutureObj_set_blocking, NULL}, \
{"_loop", (getter)FutureObj_get_loop, NULL, NULL}, \
{"_callbacks", (getter)FutureObj_get_callbacks, NULL, NULL}, \
{"_result", (getter)FutureObj_get_result, NULL, NULL}, \
{"_exception", (getter)FutureObj_get_exception, NULL, NULL}, \
{"_log_traceback", (getter)FutureObj_get_log_traceback, \
(setter)FutureObj_set_log_traceback, NULL}, \
{"_source_traceback", (getter)FutureObj_get_source_traceback, NULL, NULL},
{"_state", _Py_CAST_FUNC(getter, FutureObj_get_state), NULL, NULL}, \
{"_asyncio_future_blocking", _Py_CAST_FUNC(getter, FutureObj_get_blocking), \
_Py_CAST_FUNC(setter, FutureObj_set_blocking), NULL}, \
{"_loop", _Py_CAST_FUNC(getter, FutureObj_get_loop), NULL, NULL}, \
{"_callbacks", _Py_CAST_FUNC(getter, FutureObj_get_callbacks), NULL, NULL}, \
{"_result", _Py_CAST_FUNC(getter, FutureObj_get_result), NULL, NULL}, \
{"_exception", _Py_CAST_FUNC(getter, FutureObj_get_exception), NULL, NULL}, \
{"_log_traceback", _Py_CAST_FUNC(getter, FutureObj_get_log_traceback), \
_Py_CAST_FUNC(setter, FutureObj_set_log_traceback), NULL}, \
{"_source_traceback", _Py_CAST_FUNC(getter, FutureObj_get_source_traceback), NULL, NULL},

static PyGetSetDef FutureType_getsetlist[] = {
FUTURE_COMMON_GETSETLIST
Expand Down Expand Up @@ -1724,7 +1724,7 @@ TaskStepMethWrapper_get___self__(TaskStepMethWrapper *o)
}

static PyGetSetDef TaskStepMethWrapper_getsetlist[] = {
{"__self__", (getter)TaskStepMethWrapper_get___self__, NULL, NULL},
{"__self__", _Py_CAST_FUNC(getter, TaskStepMethWrapper_get___self__), NULL, NULL},
{NULL} /* Sentinel */
};

Expand Down Expand Up @@ -2434,11 +2434,11 @@ static PyMethodDef TaskType_methods[] = {

static PyGetSetDef TaskType_getsetlist[] = {
FUTURE_COMMON_GETSETLIST
{"_log_destroy_pending", (getter)TaskObj_get_log_destroy_pending,
(setter)TaskObj_set_log_destroy_pending, NULL},
{"_must_cancel", (getter)TaskObj_get_must_cancel, NULL, NULL},
{"_coro", (getter)TaskObj_get_coro, NULL, NULL},
{"_fut_waiter", (getter)TaskObj_get_fut_waiter, NULL, NULL},
{"_log_destroy_pending", _Py_CAST_FUNC(getter, TaskObj_get_log_destroy_pending),
_Py_CAST_FUNC(setter, TaskObj_set_log_destroy_pending), NULL},
{"_must_cancel", _Py_CAST_FUNC(getter, TaskObj_get_must_cancel), NULL, NULL},
{"_coro", _Py_CAST_FUNC(getter, TaskObj_get_coro), NULL, NULL},
{"_fut_waiter", _Py_CAST_FUNC(getter, TaskObj_get_fut_waiter), NULL, NULL},
{NULL} /* Sentinel */
};

Expand Down
2 changes: 1 addition & 1 deletion Modules/_collectionsmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,7 @@ deque_get_maxlen(dequeobject *deque)
/* deque object ********************************************************/

static PyGetSetDef deque_getset[] = {
{"maxlen", (getter)deque_get_maxlen, (setter)NULL,
{"maxlen", _Py_CAST_FUNC(getter, deque_get_maxlen), (setter)NULL,
"maximum size of a deque or None if unbounded"},
{0}
};
Expand Down
10 changes: 5 additions & 5 deletions Modules/_csv.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,11 @@ static struct PyMemberDef Dialect_memberlist[] = {
};

static PyGetSetDef Dialect_getsetlist[] = {
{ "delimiter", (getter)Dialect_get_delimiter},
{ "escapechar", (getter)Dialect_get_escapechar},
{ "lineterminator", (getter)Dialect_get_lineterminator},
{ "quotechar", (getter)Dialect_get_quotechar},
{ "quoting", (getter)Dialect_get_quoting},
{ "delimiter", _Py_CAST_FUNC(getter, Dialect_get_delimiter)},
{ "escapechar", _Py_CAST_FUNC(getter, Dialect_get_escapechar)},
{ "lineterminator", _Py_CAST_FUNC(getter, Dialect_get_lineterminator)},
{ "quotechar", _Py_CAST_FUNC(getter, Dialect_get_quotechar)},
{ "quoting", _Py_CAST_FUNC(getter, Dialect_get_quoting)},
{NULL},
};

Expand Down
20 changes: 10 additions & 10 deletions Modules/_ctypes/_ctypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1240,9 +1240,9 @@ CharArray_set_value(CDataObject *self, PyObject *value)
}

static PyGetSetDef CharArray_getsets[] = {
{ "raw", (getter)CharArray_get_raw, (setter)CharArray_set_raw,
{ "raw", _Py_CAST_FUNC(getter, CharArray_get_raw), _Py_CAST_FUNC(setter, CharArray_set_raw),
"value", NULL },
{ "value", (getter)CharArray_get_value, (setter)CharArray_set_value,
{ "value", _Py_CAST_FUNC(getter, CharArray_get_value), _Py_CAST_FUNC(setter, CharArray_set_value),
"string value"},
{ NULL, NULL }
};
Expand Down Expand Up @@ -1300,7 +1300,7 @@ WCharArray_set_value(CDataObject *self, PyObject *value)
}

static PyGetSetDef WCharArray_getsets[] = {
{ "value", (getter)WCharArray_get_value, (setter)WCharArray_set_value,
{ "value", _Py_CAST_FUNC(getter, WCharArray_get_value), _Py_CAST_FUNC(setter, WCharArray_set_value),
"string value"},
{ NULL, NULL }
};
Expand Down Expand Up @@ -3159,12 +3159,12 @@ PyCFuncPtr_get_argtypes(PyCFuncPtrObject *self)
}

static PyGetSetDef PyCFuncPtr_getsets[] = {
{ "errcheck", (getter)PyCFuncPtr_get_errcheck, (setter)PyCFuncPtr_set_errcheck,
{ "errcheck", _Py_CAST_FUNC(getter, PyCFuncPtr_get_errcheck), _Py_CAST_FUNC(setter, PyCFuncPtr_set_errcheck),
"a function to check for errors", NULL },
{ "restype", (getter)PyCFuncPtr_get_restype, (setter)PyCFuncPtr_set_restype,
{ "restype", _Py_CAST_FUNC(getter, PyCFuncPtr_get_restype), _Py_CAST_FUNC(setter, PyCFuncPtr_set_restype),
"specify the result type", NULL },
{ "argtypes", (getter)PyCFuncPtr_get_argtypes,
(setter)PyCFuncPtr_set_argtypes,
{ "argtypes", _Py_CAST_FUNC(getter, PyCFuncPtr_get_argtypes),
_Py_CAST_FUNC(setter, PyCFuncPtr_set_argtypes),
"specify the argument types", NULL },
{ NULL, NULL }
};
Expand Down Expand Up @@ -4727,7 +4727,7 @@ Simple_get_value(CDataObject *self)
}

static PyGetSetDef Simple_getsets[] = {
{ "value", (getter)Simple_get_value, (setter)Simple_set_value,
{ "value", _Py_CAST_FUNC(getter, Simple_get_value), _Py_CAST_FUNC(setter, Simple_set_value),
"current value", NULL },
{ NULL, NULL }
};
Expand Down Expand Up @@ -4969,8 +4969,8 @@ Pointer_set_contents(CDataObject *self, PyObject *value, void *closure)
}

static PyGetSetDef Pointer_getsets[] = {
{ "contents", (getter)Pointer_get_contents,
(setter)Pointer_set_contents,
{ "contents", _Py_CAST_FUNC(getter, Pointer_get_contents),
_Py_CAST_FUNC(setter, Pointer_set_contents),
"the object this pointer points to (read-write)", NULL },
{ NULL, NULL }
};
Expand Down
4 changes: 2 additions & 2 deletions Modules/_cursesmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2409,8 +2409,8 @@ static PyMethodDef PyCursesWindow_Methods[] = {

static PyGetSetDef PyCursesWindow_getsets[] = {
{"encoding",
(getter)PyCursesWindow_get_encoding,
(setter)PyCursesWindow_set_encoding,
_Py_CAST_FUNC(getter, PyCursesWindow_get_encoding),
_Py_CAST_FUNC(setter, PyCursesWindow_set_encoding),
"the typecode character used to create the array"},
{NULL, NULL, NULL, NULL } /* sentinel */
};
Expand Down
2 changes: 1 addition & 1 deletion Modules/_io/bytesio.c
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ bytesio_clear(bytesio *self)
#include "clinic/bytesio.c.h"

static PyGetSetDef bytesio_getsetlist[] = {
{"closed", (getter)bytesio_get_closed, NULL,
{"closed", _Py_CAST_FUNC(getter, bytesio_get_closed), NULL,
"True if the file is closed."},
{NULL}, /* sentinel */
};
Expand Down
14 changes: 7 additions & 7 deletions Modules/_pickle.c
Original file line number Diff line number Diff line change
Expand Up @@ -4667,10 +4667,10 @@ static PyMemberDef Pickler_members[] = {
};

static PyGetSetDef Pickler_getsets[] = {
{"memo", (getter)Pickler_get_memo,
(setter)Pickler_set_memo},
{"persistent_id", (getter)Pickler_get_persid,
(setter)Pickler_set_persid},
{"memo", _Py_CAST_FUNC(getter, Pickler_get_memo),
_Py_CAST_FUNC(setter, Pickler_set_memo)},
{"persistent_id", _Py_CAST_FUNC(getter, Pickler_get_persid),
_Py_CAST_FUNC(setter, Pickler_set_persid)},
{NULL}
};

Expand Down Expand Up @@ -7114,9 +7114,9 @@ Unpickler_set_persload(UnpicklerObject *self, PyObject *value)
}

static PyGetSetDef Unpickler_getsets[] = {
{"memo", (getter)Unpickler_get_memo, (setter)Unpickler_set_memo},
{"persistent_load", (getter)Unpickler_get_persload,
(setter)Unpickler_set_persload},
{"memo", _Py_CAST_FUNC(getter, Unpickler_get_memo), _Py_CAST_FUNC(setter, Unpickler_set_memo)},
{"persistent_load", _Py_CAST_FUNC(getter, Unpickler_get_persload),
_Py_CAST_FUNC(setter, Unpickler_set_persload)},
{NULL}
};

Expand Down
6 changes: 3 additions & 3 deletions Modules/_sqlite/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -1757,9 +1757,9 @@ static const char connection_doc[] =
PyDoc_STR("SQLite database connection object.");

static PyGetSetDef connection_getset[] = {
{"isolation_level", (getter)pysqlite_connection_get_isolation_level, (setter)pysqlite_connection_set_isolation_level},
{"total_changes", (getter)pysqlite_connection_get_total_changes, (setter)0},
{"in_transaction", (getter)pysqlite_connection_get_in_transaction, (setter)0},
{"isolation_level", _Py_CAST_FUNC(getter, pysqlite_connection_get_isolation_level), _Py_CAST_FUNC(setter, pysqlite_connection_set_isolation_level)},
{"total_changes", _Py_CAST_FUNC(getter, pysqlite_connection_get_total_changes), _Py_CAST_FUNC(setter, 0)},
{"in_transaction", _Py_CAST_FUNC(getter, pysqlite_connection_get_in_transaction), _Py_CAST_FUNC(setter, 0)},
{NULL}
};

Expand Down
8 changes: 4 additions & 4 deletions Modules/_sqlite/row.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,13 @@ static PyObject* pysqlite_row_richcompare(pysqlite_Row *self, PyObject *_other,
}

PyMappingMethods pysqlite_row_as_mapping = {
/* mp_length */ (lenfunc)pysqlite_row_length,
/* mp_subscript */ (binaryfunc)pysqlite_row_subscript,
/* mp_length */ _Py_CAST_FUNC(lenfunc, pysqlite_row_length),
/* mp_subscript */ _Py_CAST_FUNC(binaryfunc, pysqlite_row_subscript),
/* mp_ass_subscript */ (objobjargproc)0,
};

static PySequenceMethods pysqlite_row_as_sequence = {
/* sq_length */ (lenfunc)pysqlite_row_length,
/* sq_length */ _Py_CAST_FUNC(lenfunc, pysqlite_row_length),
/* sq_concat */ 0,
/* sq_repeat */ 0,
/* sq_item */ (ssizeargfunc)pysqlite_row_item,
Expand All @@ -229,7 +229,7 @@ PyTypeObject pysqlite_RowType = {
MODULE_NAME ".Row", /* tp_name */
sizeof(pysqlite_Row), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)pysqlite_row_dealloc, /* tp_dealloc */
_Py_CAST_FUNC(destructor, pysqlite_row_dealloc), /* tp_dealloc */
0, /* tp_print */
0, /* tp_getattr */
0, /* tp_setattr */
Expand Down
8 changes: 4 additions & 4 deletions Modules/_sre.c
Original file line number Diff line number Diff line change
Expand Up @@ -2579,7 +2579,7 @@ static PyMethodDef pattern_methods[] = {
};

static PyGetSetDef pattern_getset[] = {
{"groupindex", (getter)pattern_groupindex, (setter)NULL,
{"groupindex", _Py_CAST_FUNC(getter, pattern_groupindex), (setter)NULL,
"A dictionary mapping group names to group numbers."},
{NULL} /* Sentinel */
};
Expand Down Expand Up @@ -2649,11 +2649,11 @@ static PyMethodDef match_methods[] = {
};

static PyGetSetDef match_getset[] = {
{"lastindex", (getter)match_lastindex_get, (setter)NULL,
{"lastindex", _Py_CAST_FUNC(getter, match_lastindex_get), (setter)NULL,
"The integer index of the last matched capturing group."},
{"lastgroup", (getter)match_lastgroup_get, (setter)NULL,
{"lastgroup", _Py_CAST_FUNC(getter, match_lastgroup_get), (setter)NULL,
"The name of the last matched capturing group."},
{"regs", (getter)match_regs_get, (setter)NULL},
{"regs", _Py_CAST_FUNC(getter, match_regs_get), (setter)NULL},
{NULL}
};

Expand Down
34 changes: 17 additions & 17 deletions Modules/_testbuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1544,8 +1544,8 @@ ndarray_releasebuf(NDArrayObject *self, Py_buffer *view)
}

static PyBufferProcs ndarray_as_buffer = {
(getbufferproc)ndarray_getbuf, /* bf_getbuffer */
(releasebufferproc)ndarray_releasebuf /* bf_releasebuffer */
_Py_CAST_FUNC(getbufferproc, ndarray_getbuf), /* bf_getbuffer */
_Py_CAST_FUNC(releasebufferproc, ndarray_releasebuf) /* bf_releasebuffer */
};


Expand Down Expand Up @@ -2130,21 +2130,21 @@ ndarray_contig(PyObject *self, PyObject *dummy)
static PyGetSetDef ndarray_getset [] =
{
/* ndbuf */
{ "flags", (getter)ndarray_get_flags, NULL, NULL, NULL},
{ "offset", (getter)ndarray_get_offset, NULL, NULL, NULL},
{ "flags", _Py_CAST_FUNC(getter, ndarray_get_flags), NULL, NULL, NULL},
{ "offset", _Py_CAST_FUNC(getter, ndarray_get_offset), NULL, NULL, NULL},
/* ndbuf.base */
{ "obj", (getter)ndarray_get_obj, NULL, NULL, NULL},
{ "nbytes", (getter)ndarray_get_nbytes, NULL, NULL, NULL},
{ "readonly", (getter)ndarray_get_readonly, NULL, NULL, NULL},
{ "itemsize", (getter)ndarray_get_itemsize, NULL, NULL, NULL},
{ "format", (getter)ndarray_get_format, NULL, NULL, NULL},
{ "ndim", (getter)ndarray_get_ndim, NULL, NULL, NULL},
{ "shape", (getter)ndarray_get_shape, NULL, NULL, NULL},
{ "strides", (getter)ndarray_get_strides, NULL, NULL, NULL},
{ "suboffsets", (getter)ndarray_get_suboffsets, NULL, NULL, NULL},
{ "c_contiguous", (getter)ndarray_c_contig, NULL, NULL, NULL},
{ "f_contiguous", (getter)ndarray_fortran_contig, NULL, NULL, NULL},
{ "contiguous", (getter)ndarray_contig, NULL, NULL, NULL},
{ "obj", _Py_CAST_FUNC(getter, ndarray_get_obj), NULL, NULL, NULL},
{ "nbytes", _Py_CAST_FUNC(getter, ndarray_get_nbytes), NULL, NULL, NULL},
{ "readonly", _Py_CAST_FUNC(getter, ndarray_get_readonly), NULL, NULL, NULL},
{ "itemsize", _Py_CAST_FUNC(getter, ndarray_get_itemsize), NULL, NULL, NULL},
{ "format", _Py_CAST_FUNC(getter, ndarray_get_format), NULL, NULL, NULL},
{ "ndim", _Py_CAST_FUNC(getter, ndarray_get_ndim), NULL, NULL, NULL},
{ "shape", _Py_CAST_FUNC(getter, ndarray_get_shape), NULL, NULL, NULL},
{ "strides", _Py_CAST_FUNC(getter, ndarray_get_strides), NULL, NULL, NULL},
{ "suboffsets", _Py_CAST_FUNC(getter, ndarray_get_suboffsets), NULL, NULL, NULL},
{ "c_contiguous", _Py_CAST_FUNC(getter, ndarray_c_contig), NULL, NULL, NULL},
{ "f_contiguous", _Py_CAST_FUNC(getter, ndarray_fortran_contig), NULL, NULL, NULL},
{ "contiguous", _Py_CAST_FUNC(getter, ndarray_contig), NULL, NULL, NULL},
{NULL}
};

Expand Down Expand Up @@ -2758,7 +2758,7 @@ staticarray_getbuf(StaticArrayObject *self, Py_buffer *view, int flags)
}

static PyBufferProcs staticarray_as_buffer = {
(getbufferproc)staticarray_getbuf, /* bf_getbuffer */
_Py_CAST_FUNC(getbufferproc, staticarray_getbuf), /* bf_getbuffer */
NULL, /* bf_releasebuffer */
};

Expand Down
10 changes: 5 additions & 5 deletions Modules/_tkinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -899,16 +899,16 @@ get_typename(PyTclObject* obj, void* ignored)


static PyGetSetDef PyTclObject_getsetlist[] = {
{"typename", (getter)get_typename, NULL, get_typename__doc__},
{"string", (getter)PyTclObject_string, NULL,
{"typename", _Py_CAST_FUNC(getter, get_typename), NULL, get_typename__doc__},
{"string", _Py_CAST_FUNC(getter, PyTclObject_string), NULL,
PyTclObject_string__doc__},
{0},
};

static PyType_Slot PyTclObject_Type_slots[] = {
{Py_tp_dealloc, (destructor)PyTclObject_dealloc},
{Py_tp_repr, (reprfunc)PyTclObject_repr},
{Py_tp_str, (reprfunc)PyTclObject_str},
{Py_tp_dealloc, _Py_CAST_FUNC(destructor, PyTclObject_dealloc)},
{Py_tp_repr, _Py_CAST_FUNC(reprfunc, PyTclObject_repr)},
{Py_tp_str, _Py_CAST_FUNC(reprfunc, PyTclObject_str)},
{Py_tp_getattro, PyObject_GenericGetAttr},
{Py_tp_richcompare, PyTclObject_richcompare},
{Py_tp_getset, PyTclObject_getsetlist},
Expand Down
14 changes: 7 additions & 7 deletions Modules/cjkcodecs/multibytecodec.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ codecctx_errors_set(MultibyteStatefulCodecContext *self, PyObject *value,

/* This getset handlers list is used by all the stateful codec objects */
static PyGetSetDef codecctx_getsets[] = {
{"errors", (getter)codecctx_errors_get,
(setter)codecctx_errors_set,
{"errors", _Py_CAST_FUNC(getter, codecctx_errors_get),
_Py_CAST_FUNC(setter, codecctx_errors_set),
PyDoc_STR("how to treat errors")},
{NULL,}
};
Expand Down Expand Up @@ -706,7 +706,7 @@ static PyTypeObject MultibyteCodec_Type = {
sizeof(MultibyteCodecObject), /* tp_basicsize */
0, /* tp_itemsize */
/* methods */
(destructor)multibytecodec_dealloc, /* tp_dealloc */
_Py_CAST_FUNC(destructor, multibytecodec_dealloc), /* tp_dealloc */
0, /* tp_print */
0, /* tp_getattr */
0, /* tp_setattr */
Expand Down Expand Up @@ -1083,7 +1083,7 @@ static PyTypeObject MultibyteIncrementalEncoder_Type = {
sizeof(MultibyteIncrementalEncoderObject), /* tp_basicsize */
0, /* tp_itemsize */
/* methods */
(destructor)mbiencoder_dealloc, /* tp_dealloc */
_Py_CAST_FUNC(destructor, mbiencoder_dealloc), /* tp_dealloc */
0, /* tp_print */
0, /* tp_getattr */
0, /* tp_setattr */
Expand Down Expand Up @@ -1382,7 +1382,7 @@ static PyTypeObject MultibyteIncrementalDecoder_Type = {
sizeof(MultibyteIncrementalDecoderObject), /* tp_basicsize */
0, /* tp_itemsize */
/* methods */
(destructor)mbidecoder_dealloc, /* tp_dealloc */
_Py_CAST_FUNC(destructor, mbidecoder_dealloc), /* tp_dealloc */
0, /* tp_print */
0, /* tp_getattr */
0, /* tp_setattr */
Expand Down Expand Up @@ -1729,7 +1729,7 @@ static PyTypeObject MultibyteStreamReader_Type = {
sizeof(MultibyteStreamReaderObject), /* tp_basicsize */
0, /* tp_itemsize */
/* methods */
(destructor)mbstreamreader_dealloc, /* tp_dealloc */
_Py_CAST_FUNC(destructor, mbstreamreader_dealloc), /* tp_dealloc */
0, /* tp_print */
0, /* tp_getattr */
0, /* tp_setattr */
Expand Down Expand Up @@ -1975,7 +1975,7 @@ static PyTypeObject MultibyteStreamWriter_Type = {
sizeof(MultibyteStreamWriterObject), /* tp_basicsize */
0, /* tp_itemsize */
/* methods */
(destructor)mbstreamwriter_dealloc, /* tp_dealloc */
_Py_CAST_FUNC(destructor, mbstreamwriter_dealloc), /* tp_dealloc */
0, /* tp_print */
0, /* tp_getattr */
0, /* tp_setattr */
Expand Down
Loading
0