diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-10-04 13:35:28 +0200 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-10-04 13:35:28 +0200 |
commit | 1665d2c75fcfe5097983c13fdf66fd5e766890c2 (patch) | |
tree | d7ba49a40af240ba494f99eacf7bbfad32af0d3d | |
parent | 0fc80c0d5a76ed59f3db0b3f15e1e37ccc127ffb (diff) | |
download | cpython-git-1665d2c75fcfe5097983c13fdf66fd5e766890c2.tar.gz |
Issue #13099: Fix sqlite3.Cursor.lastrowid under a Turkish locale.
Reported and diagnosed by Thomas Kluyver.
-rw-r--r-- | Misc/ACKS | 1 | ||||
-rw-r--r-- | Misc/NEWS | 3 | ||||
-rw-r--r-- | Modules/_sqlite/cursor.c | 4 |
3 files changed, 6 insertions, 2 deletions
@@ -488,6 +488,7 @@ Bastian Kleineidam Bob Kline Matthias Klose Jeremy Kloth +Thomas Kluyver Kim Knapp Lenny Kneler Pat Knight @@ -36,6 +36,9 @@ Core and Builtins Library ------- +- Issue #13099: Fix sqlite3.Cursor.lastrowid under a Turkish locale. + Reported and diagnosed by Thomas Kluyver. + - Issue #13087: BufferedReader.seek() now always raises UnsupportedOperation if the underlying raw stream is unseekable, even if the seek could be satisfied using the internal buffer. Patch by John O'Connor. diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index 97908a3093..b9a4358b1a 100644 --- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -55,8 +55,8 @@ static pysqlite_StatementKind detect_statement_type(const char* statement) dst = buf; *dst = 0; - while (isalpha(*src) && dst - buf < sizeof(buf) - 2) { - *dst++ = tolower(*src++); + while (Py_ISALPHA(*src) && dst - buf < sizeof(buf) - 2) { + *dst++ = Py_TOLOWER(*src++); } *dst = 0; |