summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--giscanner/ast.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/giscanner/ast.py b/giscanner/ast.py
index 721aafcd..0c31b8a8 100644
--- a/giscanner/ast.py
+++ b/giscanner/ast.py
@@ -846,10 +846,11 @@ class Alias(Node):
class TypeContainer(Annotated):
"""A fundamental base class for Return and Parameter."""
- def __init__(self, typenode, nullable, transfer):
+ def __init__(self, typenode, nullable, transfer, direction):
Annotated.__init__(self)
self.type = typenode
self.nullable = nullable
+ self.direction = direction
if transfer is not None:
self.transfer = transfer
elif typenode.is_const:
@@ -865,9 +866,8 @@ class Parameter(TypeContainer):
transfer=None, nullable=False, optional=False,
allow_none=False, scope=None,
caller_allocates=False):
- TypeContainer.__init__(self, typenode, nullable, transfer)
+ TypeContainer.__init__(self, typenode, nullable, transfer, direction)
self.argname = argname
- self.direction = direction
self.optional = optional
self.parent = None # A Callable
@@ -887,8 +887,8 @@ class Return(TypeContainer):
"""A return value from a function."""
def __init__(self, rtype, nullable=False, transfer=None):
- TypeContainer.__init__(self, rtype, nullable, transfer)
- self.direction = PARAM_DIRECTION_OUT
+ TypeContainer.__init__(self, rtype, nullable, transfer,
+ direction=PARAM_DIRECTION_OUT)
self.parent = None # A Callable