# We still need to perform normal coerce_to processing on the
# result, because we might be coercing to an extension type,
# in which case a type test node will be needed.
+
+ def compile_time_value(self, env):
+ return self.value
class IdentifierStringNode(ConstNode):
self.is_buffer_access = False
self.base.analyse_types(env)
+ # Handle the case where base is a literal char* (and we expect a string, not an int)
+ if isinstance(self.base, StringNode):
+ self.base = self.base.coerce_to_pyobject(env)
skip_child_analysis = False
buffer_access = False
three_oct = octdigit + octdigit + octdigit
two_hex = hexdigit + hexdigit
four_hex = two_hex + two_hex
- escapeseq = Str("\\") + (two_oct | three_oct | two_hex |
+ escapeseq = Str("\\") + (two_oct | three_oct |
Str('u') + four_hex | Str('x') + two_hex |
Str('U') + four_hex + four_hex | AnyChar)
if source not in processed:
# Compiling multiple sources in one context doesn't quite
# work properly yet.
- context = Context(options.include_path) # to be removed later
if not timestamps or context.c_file_out_of_date(source):
if verbose:
sys.stderr.write("Compiling %s\n" % source)