[Pyrex] #if

Bryan Weingarten bryan.weingarten at pobox.com
Sun Oct 19 16:40:43 CEST 2003


>>
>>
>> def map_win32(self, err):
>>    #@if defined(_windows)
>>    return _wgpr._builtins._map_win32(err)
>>    #@endif
>>
>> At symbol (@) used to distinguish normal Python comments from 
>> conditional compilation statements. For more details lookup:
>> http://www.dubnerm.newmail.ru/soft/PyxPP/
>>
>> -- 
>> Best regards,
>> Michael Dubner
>> PS: Sorry for my English
>>
>>


i'm sorry, but i need to ask a similar question.  is  _windows in the 
example above defined in a c header file?   here's the line from the 
documentation

defined
    Pass any single identifier (except keywords) and by magic you will
    get true if this identifier is defined (including as global
    identifier) or not.

i don't know what "global identifier" means in this context.  is it a 
python global identifier, a pyrex global identifier a #define value in 
some c header file?   the documentation uses the words like  "c-like 
preprocessor",  "/nearly/ same meaning as in C preprocessor",  "Huge 
difference from C preprocessor".  the one and only example uses HostOS= 
"nt" which is really the python os.name variable not a c #defined 
variable.   i'm just trying to understand.

thanks,

bryan






More information about the Pyrex mailing list