summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-10-04 13:37:06 +0200
committerAntoine Pitrou <solipsis@pitrou.net>2011-10-04 13:37:06 +0200
commit8e4dd08f23c4c52d136c38943041c9b5f14eaf42 (patch)
tree62fe90a4ba2ef2e5ff1abda1dd8b604c16c5a244
parentb244d075fbb6894385e0f3cb451471051a80473b (diff)
parent1665d2c75fcfe5097983c13fdf66fd5e766890c2 (diff)
downloadcpython-git-8e4dd08f23c4c52d136c38943041c9b5f14eaf42.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 2cf3964004..3de6dae816 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -516,6 +516,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 6752d9e59b..025d42a270 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -294,6 +294,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 7f5c213411..264ae451ad 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;