IMHO, we are _much_ too generous at applying this to almost whatever gets 
exposed between .c files.
I have created something called the "restricted" api for our custom 
python27.dll where I use different
macros (PyAPI_RFUNC, pyAPI_RDATA) to mean that things aren't exported for 
"restricted" builds.  We
use it to remove some of the easier access points to the dll for hackers to 
exploit.

Also, once declared exported this way, things become more bothersome to remove 
again, since once could always argue that someone out there is using these 
thigns.

K

> -----Original Message-----
> From: python-dev-bounces+kristjan=ccpgames....@python.org
> [mailto:python-dev-bounces+kristjan=ccpgames....@python.org] On
> Behalf Of Benjamin Peterson
> Sent: 23. apríl 2012 12:59
> To: Mark Shannon
> Cc: Python Dev
> Subject: Re: [Python-Dev] What do PyAPI_FUNC & PyAPI_DATA mean?
> 
> 2012/4/23 Mark Shannon <m...@hotpy.org>:
> > Many (most?) of the function declarations in the CPython header files
> > are annotated with the PyAPI_FUNC declaration.
> > Similarly for data declarations and PyAPI_DATA
> >
> > What do they mean, exactly? From the name I would expect that they are
> > a way of declaring a function or datum to be part of the API, but
> > their usage seems to be more to do with linkage.
> 
> They define linkage on Windows. I actually don't know if they should be
> applied to internal functions.
> 
> 
> 
> --
> Regards,
> Benjamin
> _______________________________________________
> Python-Dev mailing list
> Python-Dev@python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-
> dev/kristjan%40ccpgames.com


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to