Commit a743c371 authored by Stefan Behnel's avatar Stefan Behnel

code simplification

parent 46cd487c
...@@ -10029,9 +10029,3 @@ proto=""" ...@@ -10029,9 +10029,3 @@ proto="""
#define UNARY_NEG_WOULD_OVERFLOW(x) \ #define UNARY_NEG_WOULD_OVERFLOW(x) \
(((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x))) (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
""") """)
generator_utility_code = UtilityCode.load(
"Generator",
"Generator.c",
requires=[Nodes.raise_utility_code, Nodes.swap_exception_utility_code],
)
...@@ -3560,8 +3560,7 @@ class GeneratorDefNode(DefNode): ...@@ -3560,8 +3560,7 @@ class GeneratorDefNode(DefNode):
code.putln('}') code.putln('}')
def generate_function_definitions(self, env, code): def generate_function_definitions(self, env, code):
from ExprNodes import generator_utility_code env.use_utility_code(UtilityCode.load_cached("Generator", "Generator.c"))
env.use_utility_code(generator_utility_code)
self.gbody.generate_function_header(code, proto=True) self.gbody.generate_function_header(code, proto=True)
super(GeneratorDefNode, self).generate_function_definitions(env, code) super(GeneratorDefNode, self).generate_function_definitions(env, code)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment