diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-01-19 23:34:11 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-01-19 23:34:11 +0900 |
| commit | 1c362264d328c8886d33061ab992750741f7933a (patch) | |
| tree | c56b482a6539c2992c97f3fe1bcb4d8ec46ef53f /sip/qt/qcstring.sip | |
| parent | 6054548c2546819cb0413bf6438087f5fe8f4ab4 (diff) | |
| download | pytqt-1c362264d328c8886d33061ab992750741f7933a.tar.gz pytqt-1c362264d328c8886d33061ab992750741f7933a.zip | |
Remove/replace old conditional python code.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'sip/qt/qcstring.sip')
| -rw-r--r-- | sip/qt/qcstring.sip | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sip/qt/qcstring.sip b/sip/qt/qcstring.sip index 099dab5..19387ae 100644 --- a/sip/qt/qcstring.sip +++ b/sip/qt/qcstring.sip @@ -193,19 +193,19 @@ public: if (s == NULL) s = ""; - sipRes = SIPBytes_FromString(s); + sipRes = PyBytes_FromString(s); %End %ConvertToTypeCode // Allow a Python string whenever a TQCString is expected. if (sipIsErr == NULL) - return (SIPBytes_Check(sipPy) || + return (PyBytes_Check(sipPy) || sipCanConvertToInstance(sipPy,sipClass_TQCString,SIP_NO_CONVERTORS)); - if (SIPBytes_Check(sipPy)) + if (PyBytes_Check(sipPy)) { - *sipCppPtr = new TQCString(SIPBytes_AS_STRING(sipPy)); + *sipCppPtr = new TQCString(PyBytes_AS_STRING(sipPy)); return sipGetState(sipTransferObj); } |
