From 67e1c8306984795ad1e53b4054216bdebf3fb6aa Mon Sep 17 00:00:00 2001 From: adustman Date: Fri, 7 Sep 2001 01:07:01 +0000 Subject: [PATCH] Use two arg _PyTuple_Resize() for Python 2.2 and newer. --- MySQLdb/_mysql.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MySQLdb/_mysql.c b/MySQLdb/_mysql.c index 194489d..183709a 100644 --- a/MySQLdb/_mysql.c +++ b/MySQLdb/_mysql.c @@ -261,7 +261,6 @@ _mysql_connect( return NULL; } - printf("<%d> ", c->ob_refcnt); c->open = 0; Py_BEGIN_ALLOW_THREADS ; conn = mysql_init(&(c->connection)); @@ -790,7 +789,11 @@ _mysql__fetch_row( goto error; } if (!row) { +#if PY_VERSION_HEX < 0x02020000 if (_PyTuple_Resize(r, i, 0) == -1) goto error; +#else + if (_PyTuple_Resize(r, i) == -1) goto error; +#endif break; } v = convert_row(self, row);