Skip to content

Commit 53d10a3

Browse files
committed
Fixed compile problems on old gcc.
1 parent 6f0e578 commit 53d10a3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

psycopg/typecast_basic.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,12 @@ typecast_LONGINTEGER_cast(char *s, int len, PyObject *curs)
5454
static PyObject *
5555
typecast_FLOAT_cast(char *s, int len, PyObject *curs)
5656
{
57+
PyObject *str = NULL, *flo = NULL;
5758
char *pend;
5859

5960
if (s == NULL) {Py_INCREF(Py_None); return Py_None;}
60-
PyObject *str = PyString_FromStringAndSize(s, len);
61-
PyObject *flo = PyFloat_FromString(str, &pend);
61+
str = PyString_FromStringAndSize(s, len);
62+
flo = PyFloat_FromString(str, &pend);
6263
Py_DECREF(str);
6364
return flo;
6465
}

0 commit comments

Comments
 (0)