mirror of
				https://github.com/psycopg/psycopg2.git
				synced 2025-10-31 07:47:30 +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 * | static PyObject * | ||||||
| typecast_FLOAT_cast(char *s, int len, PyObject *curs) | typecast_FLOAT_cast(char *s, int len, PyObject *curs) | ||||||
| { | { | ||||||
|  |     PyObject *str = NULL, *flo = NULL; | ||||||
|     char *pend; |     char *pend; | ||||||
|      |      | ||||||
|     if (s == NULL) {Py_INCREF(Py_None); return Py_None;} |     if (s == NULL) {Py_INCREF(Py_None); return Py_None;} | ||||||
|     PyObject *str = PyString_FromStringAndSize(s, len); |     str = PyString_FromStringAndSize(s, len); | ||||||
|     PyObject *flo = PyFloat_FromString(str, &pend); |     flo = PyFloat_FromString(str, &pend); | ||||||
|     Py_DECREF(str); |     Py_DECREF(str); | ||||||
|     return flo; |     return flo; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user