summaryrefslogtreecommitdiff
path: root/numpy/f2py/lib/extgen/base.py
diff options
context:
space:
mode:
authorPearu Peterson <pearu.peterson@gmail.com>2007-08-10 15:25:44 +0000
committerPearu Peterson <pearu.peterson@gmail.com>2007-08-10 15:25:44 +0000
commita6148b252cc8922255832bd2bed1de7d364b47d4 (patch)
tree8ea83ac050a705ee643427ec8e604e19a3f4a01a /numpy/f2py/lib/extgen/base.py
parentd4375f2985a3e5f3e503960b925b4f0e3a307171 (diff)
downloadnumpy-a6148b252cc8922255832bd2bed1de7d364b47d4.tar.gz
extgen: restored numpy support, fixed bugs.
Diffstat (limited to 'numpy/f2py/lib/extgen/base.py')
-rw-r--r--numpy/f2py/lib/extgen/base.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/numpy/f2py/lib/extgen/base.py b/numpy/f2py/lib/extgen/base.py
index 35c79a553..9351b4c28 100644
--- a/numpy/f2py/lib/extgen/base.py
+++ b/numpy/f2py/lib/extgen/base.py
@@ -183,17 +183,27 @@ class Component(object):
Component._generate_dry_run = dry_run
Component._running_generate_id += 1
Component._running_generate = True
+ self._finalize()
result = self._generate()
Component._running_generate = False
Component._generate_dry_run = old_dry_run
return result
+ def _finalize(self):
+ # recursively finalize all components.
+ for component, container_key in self.components:
+ old_parent = component.parent
+ component.parent = self
+ component._finalize()
+ component.parent = old_parent
+ self.finalize()
+
def _generate(self):
"""
Generate code idioms (saved in containers) and
return evaluated template strings.
"""
- self.finalize()
+ #self.finalize()
# clean up containers
self.containers = {}