aboutsummaryrefslogtreecommitdiffstats
path: root/build-aux/qmi-codegen/Variable.py
diff options
context:
space:
mode:
Diffstat (limited to 'build-aux/qmi-codegen/Variable.py')
-rw-r--r--build-aux/qmi-codegen/Variable.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/build-aux/qmi-codegen/Variable.py b/build-aux/qmi-codegen/Variable.py
index 6eb65d6..3f3fcec 100644
--- a/build-aux/qmi-codegen/Variable.py
+++ b/build-aux/qmi-codegen/Variable.py
@@ -44,6 +44,15 @@ class Variable:
"""
self.needs_dispose = False
+ self.endian = "QMI_ENDIAN_LITTLE"
+ if dictionary.has_key('endian'):
+ endian = dictionary['endian']
+ if endian == 'network' or endian == 'big':
+ self.endian = "QMI_ENDIAN_BIG"
+ elif endian == 'little':
+ pass
+ else:
+ raise ValueError("Invalid endian value %s" % endian)
"""
Emits the code to declare specific new types required by the variable.