]> granicus.if.org Git - postgresql/commitdiff
Use PyObject_New instead of PyObject_NEW
authorPeter Eisentraut <peter_e@gmx.net>
Tue, 18 Jan 2011 21:53:10 +0000 (23:53 +0200)
committerPeter Eisentraut <peter_e@gmx.net>
Tue, 18 Jan 2011 21:53:10 +0000 (23:53 +0200)
The latter is undocumented and the speed gain is negligible.

Jan UrbaƄski

src/pl/plpython/plpython.c

index 39a4bb585b7f89a752b5ba1d3d8cffcd1cccb62f..03d6962ca0230bcf35109d8ea705217738228e0e 100644 (file)
@@ -2671,7 +2671,7 @@ PLy_plan_new(void)
 {
        PLyPlanObject *ob;
 
-       if ((ob = PyObject_NEW(PLyPlanObject, &PLy_PlanType)) == NULL)
+       if ((ob = PyObject_New(PLyPlanObject, &PLy_PlanType)) == NULL)
                return NULL;
 
        ob->plan = NULL;
@@ -2727,7 +2727,7 @@ PLy_result_new(void)
 {
        PLyResultObject *ob;
 
-       if ((ob = PyObject_NEW(PLyResultObject, &PLy_ResultType)) == NULL)
+       if ((ob = PyObject_New(PLyResultObject, &PLy_ResultType)) == NULL)
                return NULL;
 
        /* ob->tuples = NULL; */