mirror of
https://github.com/python/cpython.git
synced 2025-10-06 23:21:06 +00:00
bpo-35059: Convert PyObject_INIT() to function (GH-10077)
* Convert PyObject_INIT() and PyObject_INIT_VAR() macros to static inline functions. * Fix usage of these functions: cast to PyObject* or PyVarObject*.
This commit is contained in:
parent
7cd2543416
commit
b4435e20a9
8 changed files with 33 additions and 16 deletions
|
@ -55,7 +55,7 @@ PyMethod_New(PyObject *func, PyObject *self)
|
|||
im = free_list;
|
||||
if (im != NULL) {
|
||||
free_list = (PyMethodObject *)(im->im_self);
|
||||
(void)PyObject_INIT(im, &PyMethod_Type);
|
||||
(void)PyObject_INIT((PyObject *)im, &PyMethod_Type);
|
||||
numfree--;
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue