File tree 1 file changed +10
-5
lines changed 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 35
35
#include <stdlib.h>
36
36
#include <string.h>
37
37
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
+
38
43
static PyObject * PGError ;
39
- static const char * PyPgVersion = "3.3 " ;
44
+ static const char * PyPgVersion = "3.4 (beta) " ;
40
45
41
46
/* taken from fileobject.c */
42
47
#define BUF (v ) PyString_AS_STRING((PyStringObject *)(v))
@@ -343,7 +348,7 @@ pgsource_dealloc(pgsourceobject * self)
343
348
PQclear (self -> last_result );
344
349
345
350
Py_XDECREF (self -> pgcnx );
346
- PyObject_DEL (self );
351
+ PyObject_Del (self );
347
352
}
348
353
349
354
/* closes object */
@@ -990,7 +995,7 @@ pglarge_dealloc(pglargeobject * self)
990
995
lo_close (self -> pgcnx -> cnx , self -> lo_fd );
991
996
992
997
Py_XDECREF (self -> pgcnx );
993
- PyObject_DEL (self );
998
+ PyObject_Del (self );
994
999
}
995
1000
996
1001
/* opens large object */
@@ -1546,7 +1551,7 @@ pg_dealloc(pgobject * self)
1546
1551
if (self -> cnx )
1547
1552
PQfinish (self -> cnx );
1548
1553
1549
- PyObject_DEL (self );
1554
+ PyObject_Del (self );
1550
1555
}
1551
1556
1552
1557
/* close without deleting */
@@ -1579,7 +1584,7 @@ pgquery_dealloc(pgqueryobject * self)
1579
1584
if (self -> last_result )
1580
1585
PQclear (self -> last_result );
1581
1586
1582
- PyObject_DEL (self );
1587
+ PyObject_Del (self );
1583
1588
}
1584
1589
1585
1590
/* resets connection */
You can’t perform that action at this time.
0 commit comments