mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-26 02:43:43 +03:00
Fixed compile problems on old gcc.
This commit is contained in:
parent
6f0e578686
commit
53d10a3ddf
|
@ -54,11 +54,12 @@ typecast_LONGINTEGER_cast(char *s, int len, PyObject *curs)
|
|||
static PyObject *
|
||||
typecast_FLOAT_cast(char *s, int len, PyObject *curs)
|
||||
{
|
||||
PyObject *str = NULL, *flo = NULL;
|
||||
char *pend;
|
||||
|
||||
if (s == NULL) {Py_INCREF(Py_None); return Py_None;}
|
||||
PyObject *str = PyString_FromStringAndSize(s, len);
|
||||
PyObject *flo = PyFloat_FromString(str, &pend);
|
||||
str = PyString_FromStringAndSize(s, len);
|
||||
flo = PyFloat_FromString(str, &pend);
|
||||
Py_DECREF(str);
|
||||
return flo;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user