]> granicus.if.org Git - python/commitdiff
reverted changes for #6459 (doesn't apply on 2.x)
authorTarek Ziadé <ziade.tarek@gmail.com>
Sat, 11 Jul 2009 17:21:00 +0000 (17:21 +0000)
committerTarek Ziadé <ziade.tarek@gmail.com>
Sat, 11 Jul 2009 17:21:00 +0000 (17:21 +0000)
Lib/distutils/command/build_ext.py
Lib/distutils/tests/test_build_ext.py
Misc/NEWS

index 17cb26b52633d6a5c4112dc0437b591c3d6fa9a9..0c79476bac1fa59f26b55da673e31d36cc18220c 100644 (file)
@@ -732,10 +732,10 @@ class build_ext(Command):
     def get_export_symbols(self, ext):
         """Return the list of symbols that a shared extension has to
         export.  This either uses 'ext.export_symbols' or, if it's not
-        provided, "PyInit_" + module_name.  Only relevant on Windows, where
-        the .pyd file (DLL) must export the module "PyInit_" function.
+        provided, "init" + module_name.  Only relevant on Windows, where
+        the .pyd file (DLL) must export the module "init" function.
         """
-        initfunc_name = "PyInit_" + ext.name.split('.')[-1]
+        initfunc_name = "init" + ext.name.split('.')[-1]
         if initfunc_name not in ext.export_symbols:
             ext.export_symbols.append(initfunc_name)
         return ext.export_symbols
index 7886c792bd3dca1c154761899434e35af9bd9883..51a21a68b49e99cf1cb26f9c967b3000b8e5aca1 100644 (file)
@@ -299,7 +299,7 @@ class BuildExtTestCase(support.TempdirManager,
     def test_get_outputs(self):
         tmp_dir = self.mkdtemp()
         c_file = os.path.join(tmp_dir, 'foo.c')
-        self.write_file(c_file, 'void PyInit_foo(void) {};\n')
+        self.write_file(c_file, 'void init_foo(void) {};\n')
         ext = Extension('foo', [c_file], optional=False)
         dist = Distribution({'name': 'xx',
                              'ext_modules': [ext]})
index 9b452f128cf3aff733389434ede871f0cee1dc1f..9cfcb920689357b541bebd3fad023261f5a926e4 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -353,9 +353,6 @@ Library
 - Issue #2622: Fixed an ImportError when importing email.messsage from a
   standalone application built with py2exe or py2app.
 
-- Issue #6459: distutils.command.build_ext.get_export_symbols now uses the 
-  "PyInit" prefix, rather than "init". 
-
 - Issue #6455: Fixed test_build_ext under win32. 
 
 - Issue #6377: Enabled the compiler option, and deprecate its usage as an