#include <stdlib.h>
#include <string.h>
+# PyObject_Del does not exist in older versions of Python.
+#if PY_VERSION_HEX < 0x01060000
+#define PyObject_Del(op) PyMem_Del((op))
+#endif
+
static PyObject *PGError;
-static const char *PyPgVersion = "3.3";
+static const char *PyPgVersion = "3.4 (beta)";
/* taken from fileobject.c */
#define BUF(v) PyString_AS_STRING((PyStringObject *)(v))
PQclear(self->last_result);
Py_XDECREF(self->pgcnx);
- PyObject_DEL(self);
+ PyObject_Del(self);
}
/* closes object */
lo_close(self->pgcnx->cnx, self->lo_fd);
Py_XDECREF(self->pgcnx);
- PyObject_DEL(self);
+ PyObject_Del(self);
}
/* opens large object */
if (self->cnx)
PQfinish(self->cnx);
- PyObject_DEL(self);
+ PyObject_Del(self);
}
/* close without deleting */
if (self->last_result)
PQclear(self->last_result);
- PyObject_DEL(self);
+ PyObject_Del(self);
}
/* resets connection */