File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 3535#include <stdlib.h>
3636#include <string.h>
3737
38+ # PyObject_Del does not exist in older versions of Python.
39+ #if PY_VERSION_HEX < 0x01060000
40+ #define PyObject_Del (op ) PyMem_Del((op))
41+ #endif
42+
3843static PyObject * PGError ;
39- static const char * PyPgVersion = "3.3 " ;
44+ static const char * PyPgVersion = "3.4 (beta) " ;
4045
4146/* taken from fileobject.c */
4247#define BUF (v ) PyString_AS_STRING((PyStringObject *)(v))
@@ -343,7 +348,7 @@ pgsource_dealloc(pgsourceobject * self)
343348 PQclear (self -> last_result );
344349
345350 Py_XDECREF (self -> pgcnx );
346- PyObject_DEL (self );
351+ PyObject_Del (self );
347352}
348353
349354/* closes object */
@@ -990,7 +995,7 @@ pglarge_dealloc(pglargeobject * self)
990995 lo_close (self -> pgcnx -> cnx , self -> lo_fd );
991996
992997 Py_XDECREF (self -> pgcnx );
993- PyObject_DEL (self );
998+ PyObject_Del (self );
994999}
9951000
9961001/* opens large object */
@@ -1546,7 +1551,7 @@ pg_dealloc(pgobject * self)
15461551 if (self -> cnx )
15471552 PQfinish (self -> cnx );
15481553
1549- PyObject_DEL (self );
1554+ PyObject_Del (self );
15501555}
15511556
15521557/* close without deleting */
@@ -1579,7 +1584,7 @@ pgquery_dealloc(pgqueryobject * self)
15791584 if (self -> last_result )
15801585 PQclear (self -> last_result );
15811586
1582- PyObject_DEL (self );
1587+ PyObject_Del (self );
15831588}
15841589
15851590/* resets connection */
You can’t perform that action at this time.
0 commit comments