diff options
| author | Alexander Larsson <alexl@redhat.com> | 2010-06-22 16:01:57 +0200 |
|---|---|---|
| committer | Alexander Larsson <alexl@redhat.com> | 2010-06-22 16:01:57 +0200 |
| commit | c621b2bdf14bbc596ec90e917a2c40fa8dc8a4e8 (patch) | |
| tree | 30129ccdba3b97bc5715b89f14629f6947dea6d3 /python_modules/demarshal.py | |
| parent | 36fd22a9db6edee0cc1700eeeab36a9f084a31d8 (diff) | |
| download | spice-c621b2bdf14bbc596ec90e917a2c40fa8dc8a4e8.tar.gz spice-c621b2bdf14bbc596ec90e917a2c40fa8dc8a4e8.tar.xz spice-c621b2bdf14bbc596ec90e917a2c40fa8dc8a4e8.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 b1c41354..8d86e84b 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)") |
