[Python-Dev] PEP 384 status (original) (raw)

Antoine Pitrou solipsis at pitrou.net
Wed Sep 1 23:19:22 CEST 2010


On Thu, 2 Sep 2010 07:04:31 +1000 Nick Coghlan <ncoghlan at gmail.com> wrote:

On Wed, Sep 1, 2010 at 10:54 PM, Antoine Pitrou <solipsis at pitrou.net> wrote: > Please consider this: even without relying on PEP 384, using FILE* > is /already/ dangerous; because you might compile an extension with a > different compiler version than Python was compiled with. So, if we were > following you, we should rip out PyObjectPrint() of the whole C API, > not only the limited subset which is defined by PEP 384. > > (now I have nothing against completely ripping out PyObjectPrint() if > we find out that it's not really useful...)

I think it would be better if everything dealing with FILE* was a macro rather than a function, yes. The definition of the limited API is a chance to fix that without incurring the cost in backwards incompatibility that would otherwise arise. Since we have that opportunity, why not take it?

Maybe I've missed your answer, but what would prevent the "inline" solution from working? (a macro with the result-as-a-pointer is quite ugly)

Regards

Antoine.



More information about the Python-Dev mailing list