[pygobject] Don't use PyImport_ImportModuleNoBlock under PyPy
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Don't use PyImport_ImportModuleNoBlock under PyPy
- Date: Sun, 25 Mar 2018 13:37:27 +0000 (UTC)
commit 112c9a08577c2e96d1a67ad4619c94368470de74
Author: Christoph Reiter <reiter christoph gmail com>
Date: Sun Mar 25 15:26:17 2018 +0200
Don't use PyImport_ImportModuleNoBlock under PyPy
It complains that it isn't supported and we don't strictly need it.
gi/pygi-python-compat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gi/pygi-python-compat.c b/gi/pygi-python-compat.c
index 4a7b8b7f..ef601017 100644
--- a/gi/pygi-python-compat.c
+++ b/gi/pygi-python-compat.c
@@ -20,7 +20,7 @@
PyObject *
PYGLIB_PyImport_ImportModule(const char *name)
{
-#if PY_VERSION_HEX < 0x03000000
+#if PY_VERSION_HEX < 0x03000000 && !defined(PYPY_VERSION)
/* see PyImport_ImportModuleNoBlock
* https://github.com/python/cpython/blob/2.7/Python/import.c#L2166-L2206 */
PyObject *result = PyImport_ImportModuleNoBlock(name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]