This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mhammond
Recipients
Date 2002-06-08.05:14:56
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Tim and I agreed that DL_IMPORT/DL_EXPORT is both sucky
and broken.  We have come up with purpose oriented
macros to replace them.

PyAPI_FUNC: public Python functions
PyAPI_DATA: public Python data
PyMODINIT_FUNC: extension module init functions.

These cover all existing cases of DL_IMPORT and
DL_EXPORT in the core.

This patch simply introduces the new macros (keeping
the old ones), and changes a small amount of code to
actually use these macros.  The vast majority of the
existing Python code using DL_IMPORT/DL_EXPORT has not
been touched.

I have a patch that changes the following:

* PC/pyconfig.h - creates the new PyAPI/MODINIT macros,
but also rationalizes this header file considerably. 
All common macros between the various compilers have
been moved to a common section.  This simplifies the
header significantly.

* Include/pyport.h - creates the new PyAPI/MODINIT
macros for non windows platforms.

* Include/import.h - move to the new macros.  I picked
this header file at random, mainly to prove that the
new macros do indeed work.

* PC/_winreg.c, Modules/_sre.c, Modules/pyexpat.c -
move to the PyMODINIT_FUNC macro.

Patch tested on Windows and Linux.
History
Date User Action Args
2007-08-23 15:13:33adminlinkissue566100 messages
2007-08-23 15:13:33admincreate