[Python-Dev] Multiple Inclusion of Header Files

Guido van Rossum guido@python.org
2002年10月10日 19:58:36 -0400


> From SF #607253, header file problems
> ( http://python.org/sf/607253 )
> is there any reason why these files:
> graminit.h
> patchlevel.h 
> pyconfig.h (aka pyconfig.h.in)
>> don't protect against being included multiple times?
>> ie, they don't have:
>> #ifndef Py_FILE_H
> #define Py_FILE_H
>> /* ... */
>> #endif /* !Py_FILE_H */

Could've been an oversight. I notice that graminit.h and pyconfig.h
are generated files. patchlevel.h was originally a one-liner.
Is there anything that is gained by adding those?
--Guido van Rossum (home page: http://www.python.org/~guido/)

AltStyle によって変換されたページ (->オリジナル) /