summaryrefslogtreecommitdiff
path: root/psycopg/microprotocols_proto.c
diff options
context:
space:
mode:
Diffstat (limited to 'psycopg/microprotocols_proto.c')
-rw-r--r--psycopg/microprotocols_proto.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/psycopg/microprotocols_proto.c b/psycopg/microprotocols_proto.c
index 72c3a7e..7acef18 100644
--- a/psycopg/microprotocols_proto.c
+++ b/psycopg/microprotocols_proto.c
@@ -19,6 +19,7 @@
* Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include <structmember.h>
#include <stringobject.h>
@@ -44,7 +45,7 @@ static PyObject *
psyco_isqlquote_getquoted(isqlquoteObject *self, PyObject *args)
{
if (!PyArg_ParseTuple(args, "")) return NULL;
-
+
Py_INCREF(Py_None);
return Py_None;
}
@@ -58,7 +59,7 @@ static PyObject *
psyco_isqlquote_getbinary(isqlquoteObject *self, PyObject *args)
{
if (!PyArg_ParseTuple(args, "")) return NULL;
-
+
Py_INCREF(Py_None);
return Py_None;
}
@@ -72,7 +73,7 @@ static PyObject *
psyco_isqlquote_getbuffer(isqlquoteObject *self, PyObject *args)
{
if (!PyArg_ParseTuple(args, "")) return NULL;
-
+
Py_INCREF(Py_None);
return Py_None;
}
@@ -119,9 +120,9 @@ static void
isqlquote_dealloc(PyObject* obj)
{
isqlquoteObject *self = (isqlquoteObject *)obj;
-
+
Py_XDECREF(self->wrapped);
-
+
obj->ob_type->tp_free(obj);
}
@@ -163,7 +164,7 @@ PyTypeObject isqlquoteType = {
sizeof(isqlquoteObject),
0,
isqlquote_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
+ 0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_compare*/
@@ -181,7 +182,7 @@ PyTypeObject isqlquoteType = {
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /*tp_flags*/
isqlquoteType_doc, /*tp_doc*/
-
+
0, /*tp_traverse*/
0, /*tp_clear*/
@@ -198,11 +199,11 @@ PyTypeObject isqlquoteType = {
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
-
+
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
-
+
isqlquote_init, /*tp_init*/
0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
isqlquote_new, /*tp_new*/