summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2012-03-21 01:46:44 +0100
committerMarc-André Lureau <marcandre.lureau@gmail.com>2012-03-21 13:24:17 +0100
commit3215ddd6cd73adef6d0a7774ece46c3526b0b26b (patch)
tree68c1fb838096e740bcf2f397b6dea1f7f3c6a52f
parent055c68ccdd33cb9d22ee34275aceb345092955f8 (diff)
downloadspice-protocol-3215ddd6cd73adef6d0a7774ece46c3526b0b26b.tar.gz
spice-protocol-3215ddd6cd73adef6d0a7774ece46c3526b0b26b.tar.xz
spice-protocol-3215ddd6cd73adef6d0a7774ece46c3526b0b26b.zip
codegen: ifdef/endif function declaration too
Compile out part that we are not supporting. In the future, we might want to declare a fake type and an empty function to keep API compatibility
-rw-r--r--python_modules/marshal.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/python_modules/marshal.py b/python_modules/marshal.py
index 8cbc426..4020799 100644
--- a/python_modules/marshal.py
+++ b/python_modules/marshal.py
@@ -378,6 +378,7 @@ def write_protocol_marshaller(writer, proto, is_server, private_marshallers):
channel = c.channel_type
if channel.has_attr("ifdef"):
writer.ifdef(channel.attributes["ifdef"][0])
+ writer.header.ifdef(channel.attributes["ifdef"][0])
if is_server:
for m in channel.client_messages:
message = m.message_type
@@ -400,6 +401,7 @@ def write_protocol_marshaller(writer, proto, is_server, private_marshallers):
functions[f] = True
if channel.has_attr("ifdef"):
writer.endif(channel.attributes["ifdef"][0])
+ writer.header.endif(channel.attributes["ifdef"][0])
if private_marshallers:
scope = writer.function("spice_message_marshallers_get" + writer.public_prefix,