summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-10-05 03:39:17 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2007-10-05 03:39:17 (GMT)
commitc47cf7debe0e8fef840867a972bde1da6e752f0e (patch)
treebfcf0a6b7c8f6d6eb81c3b0059fa6301443ee82c /Modules
parent06f8067acf45489bb962c170df5ca52f3e04e139 (diff)
downloadcpython-c47cf7debe0e8fef840867a972bde1da6e752f0e.zip
cpython-c47cf7debe0e8fef840867a972bde1da6e752f0e.tar.gz
cpython-c47cf7debe0e8fef840867a972bde1da6e752f0e.tar.bz2
dict could be NULL, so we need to XDECREF.
Fix a compiler warning about passing a PyTypeObject* instead of PyObject*.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_collectionsmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c
index 33a77b6..78a71bf 100644
--- a/Modules/_collectionsmodule.c
+++ b/Modules/_collectionsmodule.c
@@ -614,7 +614,7 @@ deque_reduce(dequeobject *deque)
PyErr_Clear();
aslist = PySequence_List((PyObject *)deque);
if (aslist == NULL) {
- Py_DECREF(dict);
+ Py_XDECREF(dict);
return NULL;
}
if (dict == NULL)
@@ -1143,7 +1143,7 @@ defdict_copy(defdictobject *dd)
whose class constructor has the same signature. Subclasses that
define a different constructor signature must override copy().
*/
- return PyObject_CallFunctionObjArgs(Py_Type(dd),
+ return PyObject_CallFunctionObjArgs((PyObject*)Py_Type(dd),
dd->default_factory, dd, NULL);
}