summaryrefslogtreecommitdiff
path: root/Python/dynload_shlib.c
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2011-03-28 13:53:40 +0300
committerEzio Melotti <ezio.melotti@gmail.com>2011-03-28 13:53:40 +0300
commitdce235203d23310e1ca12e8a8a8ed8be8e585a12 (patch)
tree7a3b79eef005b8881e3175189ff9db64dd36e2f7 /Python/dynload_shlib.c
parent23bb1f0966b9d6b169f929dac91163cec082b741 (diff)
parente5b28bc7ccd71ef30cfee95b1ead7c91c2fdaa8d (diff)
downloadcpython-dce235203d23310e1ca12e8a8a8ed8be8e585a12.tar.gz
#10617: merge with 3.1.
Diffstat (limited to 'Python/dynload_shlib.c')
-rw-r--r--Python/dynload_shlib.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/Python/dynload_shlib.c b/Python/dynload_shlib.c
index 87dae27ed4..7ea510e862 100644
--- a/Python/dynload_shlib.c
+++ b/Python/dynload_shlib.c
@@ -30,27 +30,36 @@
#define LEAD_UNDERSCORE ""
#endif
+/* The .so extension module ABI tag, supplied by the Makefile via
+ Makefile.pre.in and configure. This is used to discriminate between
+ incompatible .so files so that extensions for different Python builds can
+ live in the same directory. E.g. foomodule.cpython-32.so
+*/
const struct filedescr _PyImport_DynLoadFiletab[] = {
#ifdef __CYGWIN__
{".dll", "rb", C_EXTENSION},
{"module.dll", "rb", C_EXTENSION},
-#else
+#else /* !__CYGWIN__ */
#if defined(PYOS_OS2) && defined(PYCC_GCC)
{".pyd", "rb", C_EXTENSION},
{".dll", "rb", C_EXTENSION},
-#else
+#else /* !(defined(PYOS_OS2) && defined(PYCC_GCC)) */
#ifdef __VMS
{".exe", "rb", C_EXTENSION},
{".EXE", "rb", C_EXTENSION},
{"module.exe", "rb", C_EXTENSION},
{"MODULE.EXE", "rb", C_EXTENSION},
-#else
+#else /* !__VMS */
+ {"." SOABI ".so", "rb", C_EXTENSION},
+ {"module." SOABI ".so", "rb", C_EXTENSION},
+ {".abi" PYTHON_ABI_STRING ".so", "rb", C_EXTENSION},
+ {"module.abi" PYTHON_ABI_STRING ".so", "rb", C_EXTENSION},
{".so", "rb", C_EXTENSION},
{"module.so", "rb", C_EXTENSION},
-#endif
-#endif
-#endif
+#endif /* __VMS */
+#endif /* defined(PYOS_OS2) && defined(PYCC_GCC) */
+#endif /* __CYGWIN__ */
{0, 0}
};