summaryrefslogtreecommitdiff
path: root/spice_codegen.py
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-06-22 10:32:08 +0200
committerMarc-André Lureau <marcandre.lureau@gmail.com>2012-03-20 15:25:44 +0100
commit0349d2249dbbd8cc0da344709ce7dd4e638db4ab (patch)
treee7cf45e35ce60c2ed35b5b338c16d67a574e3c69 /spice_codegen.py
parenteded86ec1ec8f7d52cf0cc3c79051662da6e0107 (diff)
Support creating marshallers that are called indirectly
This is needed if we want to switch marshallers depending on what major version the remote side has.
Diffstat (limited to 'spice_codegen.py')
-rwxr-xr-xspice_codegen.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/spice_codegen.py b/spice_codegen.py
index c8d0d5f..0034250 100755
--- a/spice_codegen.py
+++ b/spice_codegen.py
@@ -86,6 +86,9 @@ parser.add_option("-d", "--generate-demarshallers",
parser.add_option("-m", "--generate-marshallers",
action="store_true", dest="generate_marshallers", default=False,
help="Generate message marshallers")
+parser.add_option("-P", "--private-marshallers",
+ action="store_true", dest="private_marshallers", default=False,
+ help="Generate private message marshallers")
parser.add_option("-M", "--generate-struct-marshaller",
action="append", dest="struct_marshallers",
help="Generate struct marshallers")
@@ -163,9 +166,9 @@ if options.generate_marshallers:
print >> sys.stderr, "Must specify client and/or server"
sys.exit(1)
if options.server:
- marshal.write_protocol_marshaller(writer, proto, False)
+ marshal.write_protocol_marshaller(writer, proto, False, options.private_marshallers)
if options.client:
- marshal.write_protocol_marshaller(writer, proto, True)
+ marshal.write_protocol_marshaller(writer, proto, True, options.private_marshallers)
if options.struct_marshallers:
for structname in options.struct_marshallers: