[Python-Dev] Undo indenting of macros in Include/pyport.h?
Brett Cannon
bac at OCF.Berkeley.EDU
Mon Jul 5 03:26:04 CEST 2004
If you look at Include/pyport.h and its symbol visibility section (e.g.,
PyAPI_DATA, the reason I noticed this) you will notice that a bunch of
macro definitions have tabs between the # sign and the start of whatever
the macro is about ('define', 'if defined', etc.).
In of itself it's fine, valid C code. But unless you grep without the #
sign you are not going to find definitions in there using grep. This
personally threw me since I initially grepped for "#define PyAPI_DATA"
and "#def PyAPI_DATA". After doing a blanket "PyAPI_DATA" grep I found
the definition.
Personally I would like to remove the tabs so that grepping is easier
and more obvious. But the tabbing is there since the #ifdef'ing goes
three levels deep. Any opinions on this? Since this stuff is not
documented anywhere but in the file since it is core stuff I think it
would be nice to make grepping for it easier (and no, grepping for
without the # sign won't work for me since I know I won't remember to do
that and I doubt everyone but me does grep without the # sign for macros).
-Brett
More information about the Python-Dev
mailing list