unsigned = ""
longness = ""
- type = PyrexTypes.c_long_type
+
+ def __init__(self, pos, **kwds):
+ ExprNode.__init__(self, pos, **kwds)
+ rank = max(1, len(self.longness))
+ sign = not self.unsigned
+ self.type = PyrexTypes.modifiers_and_name_to_type[sign, rank, "int"]
def coerce_to(self, dst_type, env):
if self.type is dst_type:
"""
import sys
+from cython cimport typeof
if sys.version_info[0] >= 3:
__doc__ = __doc__.replace(u'L', u'')
return 0xFFFFFFFFFFFF
else:
return 0xFFFFFFF
+
+def c_long_types():
+ """
+ >>> c_long_types()
+ long
+ long
+ long long
+ unsigned long
+ unsigned long
+ unsigned long long
+ """
+ print typeof(1)
+ print typeof(1L)
+ print typeof(1LL)
+ print typeof(1U)
+ print typeof(1UL)
+ print typeof(1ULL)