summaryrefslogtreecommitdiffstats
path: root/python_modules/marshal.py
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-07-05 12:03:34 +0200
committerMarc-André Lureau <marcandre.lureau@gmail.com>2012-03-20 15:25:47 +0100
commit1d5c7d1d79d040be7473161485eaa730c55d246e (patch)
treeef1086b6cf42748e699fc9f9be1b9dc2c8b257a3 /python_modules/marshal.py
parentc5d06102b77d20600303ff636b095c82be29f0dc (diff)
downloadspice-common-1d5c7d1d79d040be7473161485eaa730c55d246e.tar.gz
spice-common-1d5c7d1d79d040be7473161485eaa730c55d246e.tar.xz
spice-common-1d5c7d1d79d040be7473161485eaa730c55d246e.zip
marshaller: Add generic way to handle propagating attributes
Also switches @ptr_array to use this
Diffstat (limited to 'python_modules/marshal.py')
-rw-r--r--python_modules/marshal.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python_modules/marshal.py b/python_modules/marshal.py
index 95413fc..f151d94 100644
--- a/python_modules/marshal.py
+++ b/python_modules/marshal.py
@@ -186,13 +186,13 @@ def write_array_marshaller(writer, at_end, member, array, container_src, scope):
element = "%s__element" % member.name
if not scope.variable_defined(element):
- if array.ptr_array:
+ if array.has_attr("ptr_array"):
stars = " **"
else:
stars = " *"
scope.variable_def(element_type.c_type() + stars, element)
element_array = element
- if array.ptr_array:
+ if array.has_attr("ptr_array"):
element = "*" + element
if not at_end: