[issue23685] Fix usage of PyMODINIT_FUNC

2015-03-20 Thread STINNER Victor
STINNER Victor added the comment: builtin_modules.patch looks complex. It can be simplified by using the Py_BUILD_CORE define. In this case, it can be done in the issue #11410. I consider that the initial issue is fixed, so I close the issue. -- resolution: - fixed status: open -

[issue23685] Fix usage of PyMODINIT_FUNC

2015-03-18 Thread STINNER Victor
STINNER Victor added the comment: builtin_modules.patch looks complex. It can be simplified by using the Py_BUILD_CORE define. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23685 ___

[issue23685] Fix usage of PyMODINIT_FUNC

2015-03-17 Thread Steve Dower
Steve Dower added the comment: I don't think we should be using PyMODINIT_FUNC for builtin modules, since that will make the init functions publicly available from python35.dll. That said, I do like being able to be consistent here... can we define PyMODINIT_FUNC differently when building

[issue23685] Fix usage of PyMODINIT_FUNC

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: I don't think we should be using PyMODINIT_FUNC for builtin modules, since that will make the init functions publicly available from python35.dll. Do you mean that my change on PC/config.c is wrong? For example, Modules/arraymodule.c already contains:

[issue23685] Fix usage of PyMODINIT_FUNC

2015-03-17 Thread STINNER Victor
New submission from STINNER Victor: Attached patch fixes the usage of the PyMODINIT_FUNC macro. My patch is based on Thomas Wouters's patch of the issue #11410. I don't understand why Modules/pyexpat.c redefined PyMODINIT_FUNC if not defined. In which case PyMODINIT_FUNC was not defined? I'm

[issue23685] Fix usage of PyMODINIT_FUNC

2015-03-17 Thread Steve Dower
Steve Dower added the comment: Just had a look in Include/pyport.h and we're already defining PyMODINIT_FUNC differently for building core, so all your changes should be fine. The redefinition you removed from pyexpat.c was clearly never meant to be used for builtin modules. --

[issue23685] Fix usage of PyMODINIT_FUNC

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: builtin_modules.patch: add _PyBUILTIN_MODINIT_FUNC macro and use it on modules which are builtins on POSIX. I checked: it's not necessary to modify Modules/config.c to make the symbol hidden: only the C code in Modules/ need to set the attribute on the

[issue23685] Fix usage of PyMODINIT_FUNC

2015-03-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 22a0c925a7c2 by Victor Stinner in branch 'default': Issue #23685: Fix usage of PyMODINIT_FUNC in _json, _scproxy, nis, pyexpat https://hg.python.org/cpython/rev/22a0c925a7c2 -- nosy: +python-dev ___

[issue23685] Fix usage of PyMODINIT_FUNC

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: I commited PyMODINIT_FUNC.patch without the useless change on PC/config.c. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23685 ___

[issue23685] Fix usage of PyMODINIT_FUNC

2015-03-17 Thread Steve Dower
Steve Dower added the comment: Sounds good. Wasn't quite sure if you were after any effect or just consistency :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23685 ___