diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-09-25 14:41:37 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-09-26 09:45:42 +0200 |
commit | c4a85b1f960247d2f614975d182049d010b36eb3 (patch) | |
tree | e48d589aaece8aaa8680fcffd61c74432163e6c7 /build-aux/qmi-codegen/VariableFactory.py | |
parent | a336eca159f3c8c9b7f2f65c05c9adefb2617322 (diff) |
qmi-codegen: don't issue the array element clear function on 'Input' arrays
When an array is required to be passed in an input TLV, the user who created it
is responsible for freeing it. Therefore, we should not dump the static array
element clear function in these cases, or these unused methods will end up
breaking the compilation.
Diffstat (limited to 'build-aux/qmi-codegen/VariableFactory.py')
-rw-r--r-- | build-aux/qmi-codegen/VariableFactory.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/build-aux/qmi-codegen/VariableFactory.py b/build-aux/qmi-codegen/VariableFactory.py index e1d5c95..48b1541 100644 --- a/build-aux/qmi-codegen/VariableFactory.py +++ b/build-aux/qmi-codegen/VariableFactory.py @@ -30,16 +30,16 @@ from VariableArray import VariableArray Helps in the creation of Variable objects based on the specific 'format' found in the given dictionary """ -def create_variable(dictionary, new_type_name): +def create_variable(dictionary, new_type_name, container_type): if utils.format_is_integer(dictionary['format']): return VariableInteger(dictionary) elif dictionary['format'] == 'string': return VariableString(dictionary) elif dictionary['format'] == 'struct': - return VariableStruct(dictionary, new_type_name) + return VariableStruct(dictionary, new_type_name, container_type) elif dictionary['format'] == 'sequence': - return VariableSequence(dictionary, new_type_name) + return VariableSequence(dictionary, new_type_name, container_type) elif dictionary['format'] == 'array': - return VariableArray(dictionary, new_type_name) + return VariableArray(dictionary, new_type_name, container_type) else: raise RuntimeError('Unexpected field format \'%s\'' % dictionary['format']) |