[Python-Dev] Renaming Include/object.h

Gregory P. Smith greg at electricrain.com
Wed Jan 3 23:17:48 CET 2007


On Wed, Jan 03, 2007 at 02:54:34PM -0500, Barry Warsaw wrote:
> On Jan 3, 2007, at 2:29 PM, Martin v. Löwis wrote:
> 
> > Guido van Rossum schrieb:
> >> Maybe this should be done in a more systematic fashion? E.g. by  
> >> giving all "internal" header files a "py_" prefix?
> >
> > Yet another alternative would be to move all such header files into a
> > py/ directory, so you would refer to them as
> >
> > #include "py/object.h"
> >
> > Any preferences?
> 
> I think I prefer this, although I'd choose "python/object.h" just for  
> explicitness.  But if you go with a header prefix, then the shorter  
> "py_" is fine.
> 
> FWIW, I tried to do a quick grep around some of our code and I found  
> that the only "internal" header we include is structmember.h.  Why is  
> that not part of Python.h again?
> 
> -Barry

+1   on using the python/*.h subdirectory.
+0.2 on renaming only the whined about .h file.
+0.1 on using a py_ prefix for all .h files.

I prefer the python/*.h subdirectory method.  py_ in the filename is
ugly and annoying even if it does solve the immediate issue.  Other
packages that install header files commonly put them all within a
named subdirectory.

-Greg


More information about the Python-Dev mailing list