Skip to content

Commit 55f67e8

Browse files
committed
BUG31490101: Fix wrong cast of Python unicode to std::string
This patch replaces the deprecated PyUnicode_GetSize by PyUnicode_GET_LENGTH.
1 parent 407ac56 commit 55f67e8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ v8.0.24
1717
- WL#14027: Add support for Python 3.9
1818
- BUG#32435181: Add support for Django 3.2
1919
- BUG#32029891: Add context manager support for pooled connections
20+
- BUG#31490101: Fix wrong cast of Python unicode to std::string
2021

2122
v8.0.23
2223
=======

src/mysqlxpb/python.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2020, Oracle and/or its affiliates.
2+
* Copyright (c) 2017, 2021, Oracle and/or its affiliates.
33
*
44
* This program is free software; you can redistribute it and/or modify
55
* it under the terms of the GNU General Public License, version 2.0, as
@@ -34,4 +34,4 @@
3434
#define PyString_CheckExact PyUnicode_CheckExact
3535
#define PyString_AsString PyUnicode_AsUTF8
3636
#define PyString_FromString PyUnicode_FromString
37-
#define PyString_Size PyUnicode_GetSize
37+
#define PyString_Size PyUnicode_GET_LENGTH

0 commit comments

Comments
 (0)