'_Bool', '_Complex'', _Imaginary', 'inline', 'restrict'])
def c_safe_identifier(cname):
- # There are some C limitations on struct entry names.
- if (cname[:2] == '__' and not cname.startswith(Naming.pyrex_prefix)) or cname in iso_c99_keywords:
+ # There are some C limitations on struct entry names.
+ if ((cname[:2] == '__'
+ and not (cname.startswith(Naming.pyrex_prefix)
+ or cname == '__weakref__'))
+ or cname in iso_c99_keywords):
cname = Naming.pyrex_prefix + cname
return cname