summaryrefslogtreecommitdiffstats
path: root/python_modules/demarshal.py
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2012-04-06 15:25:34 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2012-04-06 15:32:02 +0200
commit725b5a9b53276aad505501e04f3d1cfbd7b6822f (patch)
treede1eece397f70a1261a6f77004b8d3a15d455feb /python_modules/demarshal.py
parent534d35cc328dd8d2002d0b0efc4d281b82e8e1c3 (diff)
downloadspice-protocol-725b5a9b53276aad505501e04f3d1cfbd7b6822f.tar.gz
spice-protocol-725b5a9b53276aad505501e04f3d1cfbd7b6822f.tar.xz
spice-protocol-725b5a9b53276aad505501e04f3d1cfbd7b6822f.zip
demarshall: add missing parens in BE read_xxx functions
The missing parens causes build to fail on big-endian machines
Diffstat (limited to 'python_modules/demarshal.py')
-rw-r--r--python_modules/demarshal.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python_modules/demarshal.py b/python_modules/demarshal.py
index c8c6837..cf48d74 100644
--- a/python_modules/demarshal.py
+++ b/python_modules/demarshal.py
@@ -50,7 +50,7 @@ def write_parser_helpers(writer):
writer.macro("read_%s" % type, "ptr", "(*((%s_t *)(ptr)))" % type)
writer.macro("write_%s" % type, "ptr, val", "*(%s_t *)(ptr) = val" % (type))
else:
- writer.macro("read_%s" % type, "ptr", "((%s_t)%s(*((%s_t *)(ptr)))" % (type, swap, utype))
+ writer.macro("read_%s" % type, "ptr", "((%s_t)%s(*((%s_t *)(ptr))))" % (type, swap, utype))
writer.macro("write_%s" % type, "ptr, val", "*(%s_t *)(ptr) = %s((%s_t)val)" % (utype, swap, utype))
writer.writeln("#else")
for size in [8, 16, 32, 64]: