summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-10-04 13:38:04 +0200
committerAntoine Pitrou <solipsis@pitrou.net>2011-10-04 13:38:04 +0200
commitace2ccf387fbe751e09fdb4bd507a3702b637d8a (patch)
treedf4a44d96dcf05f6f53e92a498925932c60bb79e
parent09debc9a5ba53c461f8f0cf8024e76af153cabf5 (diff)
downloadcpython-git-ace2ccf387fbe751e09fdb4bd507a3702b637d8a.tar.gz
Issue #13099: Fix sqlite3.Cursor.lastrowid under a Turkish locale.
Reported and diagnosed by Thomas Kluyver.
-rw-r--r--Misc/ACKS1
-rw-r--r--Misc/NEWS3
-rw-r--r--Modules/_sqlite/cursor.c4
3 files changed, 6 insertions, 2 deletions
diff --git a/Misc/ACKS b/Misc/ACKS
index a807956fb2..b7e34de859 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -450,6 +450,7 @@ Bastian Kleineidam
Bob Kline
Matthias Klose
Jeremy Kloth
+Thomas Kluyver
Kim Knapp
Lenny Kneler
Pat Knight
diff --git a/Misc/NEWS b/Misc/NEWS
index 714bf014a1..71a346d6e9 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -50,6 +50,9 @@ Core and Builtins
Library
-------
+- Issue #13099: Fix sqlite3.Cursor.lastrowid under a Turkish locale.
+ Reported and diagnosed by Thomas Kluyver.
+
- Issue #7689: Allow pickling of dynamically created classes when their
metaclass is registered with copy_reg. Patch by Nicolas M. ThiƩry and
Craig Citro.
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c
index 26e3307f88..94c3f40dfb 100644
--- a/Modules/_sqlite/cursor.c
+++ b/Modules/_sqlite/cursor.c
@@ -55,8 +55,8 @@ static pysqlite_StatementKind detect_statement_type(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;