Skip to content

Commit 5a891f2

Browse files
jcfrmrbean-bremen
authored andcommitted
chore: Add support for defining PYTHONQT_USE_PYSTRING_SHIM
1 parent af1633f commit 5a891f2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/PythonQtPythonInclude.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,12 @@
121121
#error "PythonQt requires Python >= 3.x"
122122
#endif
123123

124+
// Optional compatibility shim for legacy wrappers generated by older PythonQt.
125+
// Enable by defining PYTHONQT_USE_PYSTRING_SHIM (deprecated).
126+
#if defined(PYTHONQT_USE_PYSTRING_SHIM)
124127
#define PY3K
125-
// Helper defines to facilitate porting
126128
#define PyString_FromString PyUnicode_FromString
129+
#endif
127130

128131
// Avoid clashes with libstdc++ <locale> by undefining ctype macros
129132
// that CPython may introduce on macOS when the UTF-8 ctype quirk is enabled.

0 commit comments

Comments
 (0)