mirror of
https://github.com/python/cpython.git
synced 2025-09-16 05:36:29 +00:00
SQLite requires 64-bit integers in order to build. So the whole HAVE_LONG_LONG
#ifdefing was useless.
This commit is contained in:
parent
7e3ab45512
commit
ffa3357d52
1 changed files with 0 additions and 4 deletions
|
@ -100,9 +100,7 @@ int pysqlite_statement_bind_parameter(pysqlite_Statement* self, int pos, PyObjec
|
||||||
{
|
{
|
||||||
int rc = SQLITE_OK;
|
int rc = SQLITE_OK;
|
||||||
long longval;
|
long longval;
|
||||||
#ifdef HAVE_LONG_LONG
|
|
||||||
PY_LONG_LONG longlongval;
|
PY_LONG_LONG longlongval;
|
||||||
#endif
|
|
||||||
const char* buffer;
|
const char* buffer;
|
||||||
char* string;
|
char* string;
|
||||||
Py_ssize_t buflen;
|
Py_ssize_t buflen;
|
||||||
|
@ -157,13 +155,11 @@ int pysqlite_statement_bind_parameter(pysqlite_Statement* self, int pos, PyObjec
|
||||||
longval = PyInt_AsLong(parameter);
|
longval = PyInt_AsLong(parameter);
|
||||||
rc = sqlite3_bind_int64(self->st, pos, (sqlite_int64)longval);
|
rc = sqlite3_bind_int64(self->st, pos, (sqlite_int64)longval);
|
||||||
break;
|
break;
|
||||||
#ifdef HAVE_LONG_LONG
|
|
||||||
case TYPE_LONG:
|
case TYPE_LONG:
|
||||||
longlongval = PyLong_AsLongLong(parameter);
|
longlongval = PyLong_AsLongLong(parameter);
|
||||||
/* in the overflow error case, longlongval is -1, and an exception is set */
|
/* in the overflow error case, longlongval is -1, and an exception is set */
|
||||||
rc = sqlite3_bind_int64(self->st, pos, (sqlite_int64)longlongval);
|
rc = sqlite3_bind_int64(self->st, pos, (sqlite_int64)longlongval);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case TYPE_FLOAT:
|
case TYPE_FLOAT:
|
||||||
rc = sqlite3_bind_double(self->st, pos, PyFloat_AsDouble(parameter));
|
rc = sqlite3_bind_double(self->st, pos, PyFloat_AsDouble(parameter));
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue