diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-04-06 09:51:18 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-04-06 09:51:18 +0300 |
commit | bc62af1bbe118aa678cb6fa4ecad40f7250b56de (patch) | |
tree | 785d2ad869c2c1d058bbfdc6e9af7fb7278b9d73 /Modules/_ctypes | |
parent | aad86a6015f8d4e1e4faea07e1400152f5843443 (diff) | |
download | cpython-git-bc62af1bbe118aa678cb6fa4ecad40f7250b56de.tar.gz |
Issue #22570: Renamed Py_SETREF to Py_XSETREF.
Diffstat (limited to 'Modules/_ctypes')
-rw-r--r-- | Modules/_ctypes/_ctypes.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index 7d66d117f9..7f66d6a85f 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -424,7 +424,7 @@ StructUnionType_new(PyTypeObject *type, PyObject *args, PyObject *kwds, int isSt Py_DECREF((PyObject *)dict); return NULL; } - Py_SETREF(result->tp_dict, (PyObject *)dict); + Py_XSETREF(result->tp_dict, (PyObject *)dict); dict->format = _ctypes_alloc_format_string(NULL, "B"); if (dict->format == NULL) { Py_DECREF(result); @@ -902,7 +902,7 @@ PyCPointerType_SetProto(StgDictObject *stgdict, PyObject *proto) return -1; } Py_INCREF(proto); - Py_SETREF(stgdict->proto, proto); + Py_XSETREF(stgdict->proto, proto); return 0; } @@ -992,7 +992,7 @@ PyCPointerType_new(PyTypeObject *type, PyObject *args, PyObject *kwds) Py_DECREF((PyObject *)stgdict); return NULL; } - Py_SETREF(result->tp_dict, (PyObject *)stgdict); + Py_XSETREF(result->tp_dict, (PyObject *)stgdict); return (PyObject *)result; } @@ -1457,7 +1457,7 @@ PyCArrayType_new(PyTypeObject *type, PyObject *args, PyObject *kwds) Py_DECREF((PyObject *)stgdict); return NULL; } - Py_SETREF(result->tp_dict, (PyObject *)stgdict); + Py_XSETREF(result->tp_dict, (PyObject *)stgdict); /* Special case for character arrays. A permanent annoyance: char arrays are also strings! @@ -1880,7 +1880,7 @@ static PyObject *CreateSwappedType(PyTypeObject *type, PyObject *args, PyObject Py_DECREF((PyObject *)stgdict); return NULL; } - Py_SETREF(result->tp_dict, (PyObject *)stgdict); + Py_XSETREF(result->tp_dict, (PyObject *)stgdict); return (PyObject *)result; } @@ -2388,7 +2388,7 @@ PyCFuncPtrType_new(PyTypeObject *type, PyObject *args, PyObject *kwds) Py_DECREF((PyObject *)stgdict); return NULL; } - Py_SETREF(result->tp_dict, (PyObject *)stgdict); + Py_XSETREF(result->tp_dict, (PyObject *)stgdict); if (-1 == make_funcptrtype_dict(stgdict)) { Py_DECREF(result); @@ -2530,7 +2530,7 @@ KeepRef(CDataObject *target, Py_ssize_t index, PyObject *keep) } ob = PyCData_GetContainer(target); if (ob->b_objects == NULL || !PyDict_CheckExact(ob->b_objects)) { - Py_SETREF(ob->b_objects, keep); /* refcount consumed */ + Py_XSETREF(ob->b_objects, keep); /* refcount consumed */ return 0; } key = unique_key(target, index); @@ -3053,7 +3053,7 @@ PyCFuncPtr_set_errcheck(PyCFuncPtrObject *self, PyObject *ob) return -1; } Py_XINCREF(ob); - Py_SETREF(self->errcheck, ob); + Py_XSETREF(self->errcheck, ob); return 0; } @@ -3082,8 +3082,8 @@ PyCFuncPtr_set_restype(PyCFuncPtrObject *self, PyObject *ob) return -1; } Py_INCREF(ob); - Py_SETREF(self->restype, ob); - Py_SETREF(self->checker, PyObject_GetAttrString(ob, "_check_retval_")); + Py_XSETREF(self->restype, ob); + Py_XSETREF(self->checker, PyObject_GetAttrString(ob, "_check_retval_")); if (self->checker == NULL) PyErr_Clear(); return 0; @@ -3120,9 +3120,9 @@ PyCFuncPtr_set_argtypes(PyCFuncPtrObject *self, PyObject *ob) converters = converters_from_argtypes(ob); if (!converters) return -1; - Py_SETREF(self->converters, converters); + Py_XSETREF(self->converters, converters); Py_INCREF(ob); - Py_SETREF(self->argtypes, ob); + Py_XSETREF(self->argtypes, ob); } return 0; } |