forked from macports/macports-ports
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
py-{shiboken,pyside}: add py312 subport
- Loading branch information
Showing
4 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- PySide/QtCore/typesystem_core_common.xml | ||
+++ PySide/QtCore/typesystem_core_common.xml | ||
@@ -201,12 +201,11 @@ | ||
</native-to-target> | ||
<target-to-native> | ||
<add-conversion type="PyUnicode"> | ||
- Py_UNICODE* unicode = PyUnicode_AS_UNICODE(%in); | ||
#if defined(Py_UNICODE_WIDE) | ||
// cast as Py_UNICODE can be a different type | ||
- %out = QString::fromUcs4((const uint*)unicode); | ||
+ %out = QString::fromUcs4((const uint*)PyUnicode_4BYTE_DATA(%in)); | ||
#else | ||
- %out = QString::fromUtf16((const ushort*)unicode, PyUnicode_GET_SIZE(%in)); | ||
+ %out = QString::fromUtf16((const ushort*)PyUnicode_2BYTE_DATA(%in), PyUnicode_GET_SIZE(%in)); | ||
#endif | ||
</add-conversion> | ||
<add-conversion type="PyString" check="py2kStrCheck(%in)"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- libshiboken/sbkstring.cpp | ||
+++ libshiboken/sbkstring.cpp | ||
@@ -173,7 +173,7 @@ Py_ssize_t len(PyObject* str) | ||
return 0; | ||
|
||
if (PyUnicode_Check(str)) | ||
- return PyUnicode_GET_SIZE(str); | ||
+ return PyUnicode_GetLength(str); | ||
|
||
if (PyBytes_Check(str)) | ||
return PyBytes_GET_SIZE(str); |