Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame^] | 1 | From b9f95c06b2e7a525f4f93d705976882e8dcba6ab Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Tue, 20 Dec 2022 09:46:31 -0800 |
| 4 | Subject: [PATCH] sip: Conditionally use GetAssertStackTrace under |
| 5 | USE_STACKWALKER |
| 6 | |
| 7 | Musl eg. does not implement stack walker ( backtrace ) therefore it gets |
| 8 | disabled for wxwidgets on those systems. This needs to be checked before using |
| 9 | GetAssertStackTrace() |
| 10 | |
| 11 | Upstream-Status: Pending |
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 13 | --- |
| 14 | sip/cpp/sip_corewxAppTraits.cpp | 4 ++++ |
| 15 | 1 file changed, 4 insertions(+) |
| 16 | |
| 17 | diff --git a/sip/cpp/sip_corewxAppTraits.cpp b/sip/cpp/sip_corewxAppTraits.cpp |
| 18 | index 9c9f9d5b..1d2d2f90 100644 |
| 19 | --- a/sip/cpp/sip_corewxAppTraits.cpp |
| 20 | +++ b/sip/cpp/sip_corewxAppTraits.cpp |
| 21 | @@ -471,7 +471,11 @@ static PyObject *meth_wxAppTraits_GetAssertStackTrace(PyObject *sipSelf, PyObjec |
| 22 | PyErr_Clear(); |
| 23 | |
| 24 | Py_BEGIN_ALLOW_THREADS |
| 25 | +#if wxUSE_STACKWALKER |
| 26 | sipRes = new ::wxString((sipSelfWasArg ? sipCpp-> ::wxAppTraits::GetAssertStackTrace() : sipCpp->GetAssertStackTrace())); |
| 27 | +#else |
| 28 | + sipRes = new ::wxString(""); |
| 29 | +#endif |
| 30 | Py_END_ALLOW_THREADS |
| 31 | |
| 32 | if (PyErr_Occurred()) |