Skip to content

Commit ace2ccf

Browse files
committed
Issue python#13099: Fix sqlite3.Cursor.lastrowid under a Turkish locale.
Reported and diagnosed by Thomas Kluyver.
1 parent 09debc9 commit ace2ccf

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ Bastian Kleineidam
450450
Bob Kline
451451
Matthias Klose
452452
Jeremy Kloth
453+
Thomas Kluyver
453454
Kim Knapp
454455
Lenny Kneler
455456
Pat Knight

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ Core and Builtins
5050
Library
5151
-------
5252

53+
- Issue #13099: Fix sqlite3.Cursor.lastrowid under a Turkish locale.
54+
Reported and diagnosed by Thomas Kluyver.
55+
5356
- Issue #7689: Allow pickling of dynamically created classes when their
5457
metaclass is registered with copy_reg. Patch by Nicolas M. Thiéry and
5558
Craig Citro.

Modules/_sqlite/cursor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ static pysqlite_StatementKind detect_statement_type(char* statement)
5555

5656
dst = buf;
5757
*dst = 0;
58-
while (isalpha(*src) && dst - buf < sizeof(buf) - 2) {
59-
*dst++ = tolower(*src++);
58+
while (Py_ISALPHA(*src) && dst - buf < sizeof(buf) - 2) {
59+
*dst++ = Py_TOLOWER(*src++);
6060
}
6161

6262
*dst = 0;

0 commit comments

Comments
 (0)