From d0b35adeb6772c5506f416875bcf9596062bcb5d Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Tue, 13 May 2014 14:00:59 +0100 Subject: [PATCH] Parse the rowcount as long --- psycopg/cursor_type.c | 2 +- psycopg/pqpath.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/psycopg/cursor_type.c b/psycopg/cursor_type.c index d7294006..623ed128 100644 --- a/psycopg/cursor_type.c +++ b/psycopg/cursor_type.c @@ -506,7 +506,7 @@ psyco_curs_executemany(cursorObject *self, PyObject *args, PyObject *kwargs) { PyObject *operation = NULL, *vars = NULL; PyObject *v, *iter = NULL; - int rowcount = 0; + long rowcount = 0; static char *kwlist[] = {"query", "vars_list", NULL}; diff --git a/psycopg/pqpath.c b/psycopg/pqpath.c index 618297ec..05d22ee9 100644 --- a/psycopg/pqpath.c +++ b/psycopg/pqpath.c @@ -1274,7 +1274,7 @@ _read_rowcount(cursorObject *curs) if (!rowcount || !rowcount[0]) { curs->rowcount = -1; } else { - curs->rowcount = atoi(rowcount); + curs->rowcount = atol(rowcount); } }