aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/libshiboken
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-02-01 16:03:08 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-02-04 10:08:00 +0000
commit12e8f4774edd430d9d2c6ec5b8e0e40a25ad0a24 (patch)
tree63e5d977d4d5ff2a6e968a49c693db8be0cf634d /sources/shiboken2/libshiboken
parentf89cb615182fe818bcc17984b4babc40095ac339 (diff)
libshiboken: Fix unused function warning (PepRun_GetResult)
Add #ifdefs, fixing: sources/shiboken2/libshiboken/pep384impl.cpp:413:1: warning: ‘PyObject* PepRun_GetResult(const char*, const char*)’ defined but not used [-Wunused-function] PepRun_GetResult(const char *command, const char *resvar) Change-Id: I5e469d6a24e95a602b882adbaad334a4ecf9af23 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/libshiboken')
-rw-r--r--sources/shiboken2/libshiboken/pep384impl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/sources/shiboken2/libshiboken/pep384impl.cpp b/sources/shiboken2/libshiboken/pep384impl.cpp
index 7b333f4ff..9a52603dc 100644
--- a/sources/shiboken2/libshiboken/pep384impl.cpp
+++ b/sources/shiboken2/libshiboken/pep384impl.cpp
@@ -409,6 +409,7 @@ PyRun_String(const char *str, int start, PyObject *globals, PyObject *locals)
// This is only a simple local helper that returns a computed variable.
// Used also in Python 2.
+#if defined(Py_LIMITED_API) || PY_VERSION_HEX < 0x03000000
static PyObject *
PepRun_GetResult(const char *command, const char *resvar)
{
@@ -424,6 +425,7 @@ PepRun_GetResult(const char *command, const char *resvar)
Py_DECREF(d);
return res;
}
+#endif // Py_LIMITED_API || Python 2
#ifdef Py_LIMITED_API