homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author BinaryMan32
Recipients BinaryMan32, ghaering
Date 2010年03月01日.02:22:17
SpamBayes Score 4.7741777e-10
Marked as misclassified No
Message-id <1267410139.17.0.934416418103.issue8033@psf.upfronthosting.co.za>
In-reply-to
Content
I've never really looked at the python source before, but this is my best guess at the problem:
For the standard SELECT query:
In Modules/_sqlite/cursor.c, _pysqlite_fetch_one_row() has this code:
PY_LONG_LONG intval;
...
} else if (coltype == SQLITE_INTEGER) {
 intval = sqlite3_column_int64(self->statement->st, i);
 if (intval < INT32_MIN || intval > INT32_MAX) {
 converted = PyLong_FromLongLong(intval);
 } else {
 converted = PyInt_FromLong((long)intval);
 }
}
For user-defined function arguments:
In Modules/_sqlite/connection.c, _pysqlite_build_py_params() has this code:
PY_LONG_LONG val_int;
...
case SQLITE_INTEGER:
 val_int = sqlite3_value_int64(cur_value);
 cur_py_value = PyInt_FromLong((long)val_int);
 break;
A select query can return long integers from C to python but a user-defined function argument cannot.
History
Date User Action Args
2010年03月01日 02:22:19BinaryMan32setrecipients: + BinaryMan32, ghaering
2010年03月01日 02:22:19BinaryMan32setmessageid: <1267410139.17.0.934416418103.issue8033@psf.upfronthosting.co.za>
2010年03月01日 02:22:17BinaryMan32linkissue8033 messages
2010年03月01日 02:22:17BinaryMan32create

AltStyle によって変換されたページ (->オリジナル) /