[Python-checkins] cpython: fixed the export symbols for the win32 linker
tarek.ziade
python-checkins at python.org
Sat May 21 21:48:27 CEST 2011
http://hg.python.org/cpython/rev/406ba3cdebcb
changeset: 70261:406ba3cdebcb
user: Tarek Ziade <tarek at ziade.org>
date: Sat May 21 21:48:04 2011 +0200
summary:
fixed the export symbols for the win32 linker
files:
Lib/packaging/command/build_ext.py | 2 +-
Lib/packaging/tests/test_command_build_ext.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/packaging/command/build_ext.py b/Lib/packaging/command/build_ext.py
--- a/Lib/packaging/command/build_ext.py
+++ b/Lib/packaging/command/build_ext.py
@@ -589,7 +589,7 @@
provided, "init" + module_name. Only relevant on Windows, where
the .pyd file (DLL) must export the module "init" function.
"""
- initfunc_name = "init" + ext.name.split('.')[-1]
+ initfunc_name = "PyInit_" + ext.name.split('.')[-1]
if initfunc_name not in ext.export_symbols:
ext.export_symbols.append(initfunc_name)
return ext.export_symbols
diff --git a/Lib/packaging/tests/test_command_build_ext.py b/Lib/packaging/tests/test_command_build_ext.py
--- a/Lib/packaging/tests/test_command_build_ext.py
+++ b/Lib/packaging/tests/test_command_build_ext.py
@@ -239,7 +239,7 @@
def test_get_outputs(self):
tmp_dir = self.mkdtemp()
c_file = os.path.join(tmp_dir, 'foo.c')
- self.write_file(c_file, 'void initfoo(void) {};\n')
+ self.write_file(c_file, 'void PyInit_foo(void) {};\n')
ext = Extension('foo', [c_file], optional=False)
dist = Distribution({'name': 'xx',
'ext_modules': [ext]})
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list