summaryrefslogtreecommitdiff
path: root/numpy/f2py/lib/extgen/c_support.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/c_support.py
parentd4375f2985a3e5f3e503960b925b4f0e3a307171 (diff)
downloadnumpy-a6148b252cc8922255832bd2bed1de7d364b47d4.tar.gz
extgen: restored numpy support, fixed bugs.
Diffstat (limited to 'numpy/f2py/lib/extgen/c_support.py')
-rw-r--r--numpy/f2py/lib/extgen/c_support.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/f2py/lib/extgen/c_support.py b/numpy/f2py/lib/extgen/c_support.py
index 95b7bb675..baaca7d17 100644
--- a/numpy/f2py/lib/extgen/c_support.py
+++ b/numpy/f2py/lib/extgen/c_support.py
@@ -134,7 +134,7 @@ class CDeclaration(Component):
class CArgument(CDeclaration):
def initialize(self, name, ctype, **options):
- return CDeclaration.initialize(ctype, name, **options)
+ return CDeclaration.initialize(self, ctype, name, **options)
class CCode(Code):
@@ -149,7 +149,7 @@ class CFunction(Component):
foo(void) {
}
>>> f += Keyword('static')
- >>> f += CArgument('int', 'a')
+ >>> f += CArgument('a', 'int')
>>> f += 'a = 2;'
>>> print f.generate()
static
@@ -157,7 +157,7 @@ class CFunction(Component):
foo(int a) {
a = 2;
}
- >>> f += CArgument('float', 'b')
+ >>> f += CArgument('b', 'float')
>>> f += CDeclaration('float', 'c')
>>> f += CDeclaration('float', CDeclarator('d','3.0'))
>>> print f.generate()