diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-10-17 09:58:06 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-10-17 08:37:39 +0000 |
commit | cc043200068f4299cc5c6f126327bc1993486135 (patch) | |
tree | e8897b1021757bff390cd265772c76be597415ce /sources/shiboken2/libshiboken | |
parent | b8201a3ad2e778ed58cb285369055dc4d0d450bd (diff) |
Fix crash when using a MSVC debug build
The pointers of probe_tp_name and check->tp_name are different
when using the MSVC debug runtime. Use strcmp() instead.
Fixes: PYSIDE-835
Change-Id: I8b6735a9a407bf3325986edd61a7911964802a24
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/shiboken2/libshiboken')
-rw-r--r-- | sources/shiboken2/libshiboken/pep384impl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/shiboken2/libshiboken/pep384impl.cpp b/sources/shiboken2/libshiboken/pep384impl.cpp index 4481f1cdd..0baf6ed42 100644 --- a/sources/shiboken2/libshiboken/pep384impl.cpp +++ b/sources/shiboken2/libshiboken/pep384impl.cpp @@ -130,7 +130,7 @@ check_PyTypeObject_valid(void) long probe_tp_dictoffset = PyLong_AsLong(d); PyObject *probe_tp_mro = PyObject_GetAttrString(obtype, "__mro__"); if (false - || (probe_tp_name - check->tp_name) != 0 // to avoid warning + || strcmp(probe_tp_name, check->tp_name) != 0 || probe_tp_basicsize != check->tp_basicsize || probe_tp_call != check->tp_call || probe_tp_str != check->tp_str |