diff Modules/_sqlite/row.c @ 46178:e06e08e8fdce

Bring sqlite3 module up-to-date with what's now in 2.6. Almost. I intentionally left out the stuff about creating a connection object from a APSW connection.
author Gerhard Häring <gh@ghaering.de>
date Sat, 29 Mar 2008 00:45:29 +0000
parents 86a2679dca46
children 031dfe455585
line wrap: on
line diff
--- a/Modules/_sqlite/row.c	Sat Mar 29 00:41:18 2008 +0000
+++ b/Modules/_sqlite/row.c	Sat Mar 29 00:45:29 2008 +0000
@@ -154,6 +154,11 @@
     return list;
 }
 
+static int pysqlite_row_print(pysqlite_Row* self, FILE *fp, int flags)
+{
+    return (&PyTuple_Type)->tp_print(self->data, fp, flags);
+}
+
 static PyObject* pysqlite_iter(pysqlite_Row* self)
 {
     return PyObject_GetIter(self->data);
@@ -178,7 +183,7 @@
         sizeof(pysqlite_Row),                           /* tp_basicsize */
         0,                                              /* tp_itemsize */
         (destructor)pysqlite_row_dealloc,               /* tp_dealloc */
-        0,				                /* tp_print */
+        (printfunc)pysqlite_row_print,                  /* tp_print */
         0,                                              /* tp_getattr */
         0,                                              /* tp_setattr */
         0,                                              /* tp_compare */