diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-06-22 16:01:57 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2012-03-20 15:25:44 +0100 |
commit | 2523cec8c4890f977ee5569d9280d54108790674 (patch) | |
tree | 67a7e83a8dc2cc44a29bee58c31d533d5739c386 /python_modules/demarshal.py | |
parent | 38412df9aaac82865f7251ee67623fe48d034940 (diff) | |
download | spice-protocol-2523cec8c4890f977ee5569d9280d54108790674.tar.gz spice-protocol-2523cec8c4890f977ee5569d9280d54108790674.tar.xz spice-protocol-2523cec8c4890f977ee5569d9280d54108790674.zip |
Support extra prefix in code generators
This is require when we add a new spice.proto for the old (major 1)
protocol description.
Diffstat (limited to 'python_modules/demarshal.py')
-rw-r--r-- | python_modules/demarshal.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/python_modules/demarshal.py b/python_modules/demarshal.py index b1c4135..8d86e84 100644 --- a/python_modules/demarshal.py +++ b/python_modules/demarshal.py @@ -966,9 +966,9 @@ def write_channel_parser(writer, channel, server): def write_get_channel_parser(writer, channel_parsers, max_channel, is_server): writer.newline() if is_server: - function_name = "spice_get_server_channel_parser" + function_name = "spice_get_server_channel_parser" + writer.public_prefix else: - function_name = "spice_get_client_channel_parser" + function_name = "spice_get_client_channel_parser" + writer.public_prefix scope = writer.function(function_name, "spice_parse_channel_func_t", @@ -1015,15 +1015,15 @@ def write_full_protocol_parser(writer, is_server): function_name = "spice_parse_msg" else: function_name = "spice_parse_reply" - scope = writer.function(function_name, + scope = writer.function(function_name + writer.public_prefix, "uint8_t *", "uint8_t *message_start, uint8_t *message_end, uint32_t channel, uint16_t message_type, int minor, size_t *size_out, message_destructor_t *free_message") scope.variable_def("spice_parse_channel_func_t", "func" ) if is_server: - writer.assign("func", "spice_get_server_channel_parser(channel, NULL)") + writer.assign("func", "spice_get_server_channel_parser%s(channel, NULL)" % writer.public_prefix) else: - writer.assign("func", "spice_get_client_channel_parser(channel, NULL)") + writer.assign("func", "spice_get_client_channel_parser%s(channel, NULL)" % writer.public_prefix) with writer.if_block("func != NULL"): writer.statement("return func(message_start, message_end, message_type, minor, size_out, free_message)") |