[Python-checkins] r87109 - python/branches/py3k/Objects/descrobject.c

benjamin.peterson python-checkins at python.org
Tue Dec 7 05:04:04 CET 2010


Author: benjamin.peterson
Date: Tue Dec  7 05:04:02 2010
New Revision: 87109

Log:
use the more direct API

Modified:
   python/branches/py3k/Objects/descrobject.c

Modified: python/branches/py3k/Objects/descrobject.c
==============================================================================
--- python/branches/py3k/Objects/descrobject.c	(original)
+++ python/branches/py3k/Objects/descrobject.c	Tue Dec  7 05:04:02 2010
@@ -1190,7 +1190,7 @@
         PyErr_SetString(PyExc_AttributeError, "unreadable attribute");
         return NULL;
     }
-    return PyObject_CallFunction(gs->prop_get, "(O)", obj);
+    return PyObject_CallFunctionObjArgs(gs->prop_get, obj, NULL);
 }
 
 static int
@@ -1211,9 +1211,9 @@
         return -1;
     }
     if (value == NULL)
-        res = PyObject_CallFunction(func, "(O)", obj);
+        res = PyObject_CallFunctionObjArgs(func, obj, NULL);
     else
-        res = PyObject_CallFunction(func, "(OO)", obj, value);
+        res = PyObject_CallFunctionObjArgs(func, obj, value, NULL);
     if (res == NULL)
         return -1;
     Py_DECREF(res);


More information about the Python-checkins mailing list