]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #13099: Fix sqlite3.Cursor.lastrowid under a Turkish locale.
authorAntoine Pitrou <solipsis@pitrou.net>
Tue, 4 Oct 2011 11:38:04 +0000 (13:38 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Tue, 4 Oct 2011 11:38:04 +0000 (13:38 +0200)
Reported and diagnosed by Thomas Kluyver.

Misc/ACKS
Misc/NEWS
Modules/_sqlite/cursor.c

index a807956fb2d0a0e81925f972088dac3582327eb5..b7e34de859e0abafaf95c43d5b26f0e7e335a91c 100644 (file)
--- 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
index 714bf014a12d2ac50cd8f814daa3a3778dcc837f..71a346d6e9d03a521c21a41042ac62f9ebf2a4ea 100644 (file)
--- 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.
index 26e3307f885864ffad53295080f8b72a4d62c1d8..94c3f40dfbf30ee0a372108c5fccfb7294d02e01 100644 (file)
@@ -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;