summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2014-05-13 14:00:59 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2014-05-13 14:21:06 +0100
commit96d62607067cf2b5a2952a21b1e249709c229a1b (patch)
tree1e609521134319a865088ab123aab8f33f817cf6
parent755a5b143f386026c419c8f03ef82f41abd3b8fc (diff)
downloadpsycopg2-maint_2_4.tar.gz
Parse the rowcount as longmaint_2_4
-rw-r--r--psycopg/cursor_type.c2
-rw-r--r--psycopg/pqpath.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/psycopg/cursor_type.c b/psycopg/cursor_type.c
index 8cc391b..494c15d 100644
--- a/psycopg/cursor_type.c
+++ b/psycopg/cursor_type.c
@@ -497,7 +497,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 3cd62e8..58cd8c5 100644
--- a/psycopg/pqpath.c
+++ b/psycopg/pqpath.c
@@ -1241,7 +1241,7 @@ _read_rowcount(cursorObject *curs)
if (!rowcount || !rowcount[0]) {
curs->rowcount = -1;
} else {
- curs->rowcount = atoi(rowcount);
+ curs->rowcount = atol(rowcount);
}
}