[Python-Dev] What do PyAPI_FUNC & PyAPI_DATA mean? (original) (raw)
Kristján Valur Jónsson kristjan at ccpgames.com
Mon Apr 23 15:05:35 CEST 2012
- Previous message: [Python-Dev] What do PyAPI_FUNC & PyAPI_DATA mean?
- Next message: [Python-Dev] What do PyAPI_FUNC & PyAPI_DATA mean?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.com at python.org [mailto:python-dev-bounces+kristjan=ccpgames.com at 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 PyAPIFUNC & PyAPIDATA mean?
2012/4/23 Mark Shannon <mark at hotpy.org>: > Many (most?) of the function declarations in the CPython header files > are annotated with the PyAPIFUNC declaration. > Similarly for data declarations and PyAPIDATA > > 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 at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python- dev/kristjan%40ccpgames.com
- Previous message: [Python-Dev] What do PyAPI_FUNC & PyAPI_DATA mean?
- Next message: [Python-Dev] What do PyAPI_FUNC & PyAPI_DATA mean?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]