[Python-checkins] python/dist/src/Objects dictobject.c,2.131,2.132

Neal Norwitz neal@metaslash.com
Wed, 27 Nov 2002 08:59:22 -0500


On Tue, Nov 26, 2002 at 11:29:35PM -0800, rhettinger@users.sourceforge.net wrote:
> Modified Files:
> 	dictobject.c 
> 
> + 	d = PyObject_CallObject(cls, NULL);
> + 	if (d == NULL)
> + 		return NULL;
> + 	if (!PyDict_Check(d)) {
> + 		PyErr_BadInternalCall();
> + 		return NULL;
> + 	}

Shouldn't there be a Py_DECREF(d) if type(d) is not dict?

Neal