[Python-Dev] What do PyAPI_FUNC & PyAPI_DATA mean?

Kristján Valur Jónsson kristjan at ccpgames.com
Tue Apr 24 12:16:08 CEST 2012


You know that I'm speaking of Windows, right?
IMHO, we shouldn't put the PyAPI* stuff on functions unless they are actual API functions.
I don't know how the export tables for ELF .so objects is generated, but it surely can't
export _everything_.  Anyway, marking stuff as part of the API makes sense, and marking
functions as being part of the API makes no sense and is wasteful when they are not.
We might even have something similar for the stable api.

> -----Original Message-----
> From: "Martin v. Löwis" [mailto:martin at v.loewis.de]
> Sent: 24. apríl 2012 07:31
> To: Kristján Valur Jónsson
> Cc: Benjamin Peterson; Mark Shannon; Python Dev
> Subject: Re: [Python-Dev] What do PyAPI_FUNC & PyAPI_DATA mean?
 
> For this, PyAPI_FUNC doesn't really matter. A symbol that is listed in the
> header file is available on Unix even without such a declaration, so listing it in
> the public header file is already the step that makes it public, not specifying it
> as PyAPI_FUNC.
> 
> 
> I agree that too much API is public, but the right approach is to rename such
> API to _Py*, indicating to users that we don't want them to use it.
> For existing API, that's tricky; for new API, I think it should be private by
> default.




More information about the Python-Dev mailing list