diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-06-22 16:03:02 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2010-06-22 16:03:02 +0200 |
commit | 759a3d5446a5ebeaf074529c28bc97ad0599ef39 (patch) | |
tree | e424d541beb04be9d302829c9417682fac4ea949 /python_modules | |
parent | c621b2bdf14bbc596ec90e917a2c40fa8dc8a4e8 (diff) | |
download | spice-759a3d5446a5ebeaf074529c28bc97ad0599ef39.tar.gz spice-759a3d5446a5ebeaf074529c28bc97ad0599ef39.tar.xz spice-759a3d5446a5ebeaf074529c28bc97ad0599ef39.zip |
Make internal generated marshaller functions static
Diffstat (limited to 'python_modules')
-rw-r--r-- | python_modules/demarshal.py | 6 | ||||
-rw-r--r-- | python_modules/marshal.py | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/python_modules/demarshal.py b/python_modules/demarshal.py index 8d86e84b..eee659f1 100644 --- a/python_modules/demarshal.py +++ b/python_modules/demarshal.py @@ -149,7 +149,7 @@ def write_validate_struct_function(writer, struct): writer.set_is_generated("validator", validate_function) writer = writer.function_helper() - scope = writer.function(validate_function, "intptr_t", "uint8_t *message_start, uint8_t *message_end, SPICE_ADDRESS offset, int minor") + scope = writer.function(validate_function, "static intptr_t", "uint8_t *message_start, uint8_t *message_end, SPICE_ADDRESS offset, int minor") scope.variable_def("uint8_t *", "start = message_start + offset") scope.variable_def("SPICE_GNUC_UNUSED uint8_t *", "pos"); scope.variable_def("size_t", "mem_size", "nw_size"); @@ -661,7 +661,7 @@ def write_parse_ptr_function(writer, target_type): writer.set_is_generated("parser", parse_function) writer = writer.function_helper() - scope = writer.function(parse_function, "uint8_t *", "uint8_t *message_start, uint8_t *message_end, uint8_t *struct_data, PointerInfo *this_ptr_info, int minor") + scope = writer.function(parse_function, "static uint8_t *", "uint8_t *message_start, uint8_t *message_end, uint8_t *struct_data, PointerInfo *this_ptr_info, int minor") scope.variable_def("uint8_t *", "in = message_start + this_ptr_info->offset") scope.variable_def("uint8_t *", "end") @@ -932,7 +932,7 @@ def write_channel_parser(writer, channel, server): function_name = "parse_%s_msgc" % channel.name writer.newline() scope = writer.function(function_name, - "uint8_t *", + "static uint8_t *", "uint8_t *message_start, uint8_t *message_end, uint16_t message_type, int minor, size_t *size_out, message_destructor_t *free_message") helpers = writer.function_helper() diff --git a/python_modules/marshal.py b/python_modules/marshal.py index 76081a99..c4bb896f 100644 --- a/python_modules/marshal.py +++ b/python_modules/marshal.py @@ -115,7 +115,7 @@ def write_marshal_ptr_function(writer, target_type): writer.header = header writer.out_prefix = "" if target_type.is_array(): - scope = writer.function(marshal_function, "void *", "SpiceMarshaller *m, %s_t *ptr, int count" % target_type.element_type.primitive_type() + names_args) + scope = writer.function(marshal_function, "SPICE_GNUC_UNUSED static void *", "SpiceMarshaller *m, %s_t *ptr, int count" % target_type.element_type.primitive_type() + names_args) else: scope = writer.function(marshal_function, "void *", "SpiceMarshaller *m, %s *ptr" % target_type.c_type() + names_args) header.writeln("void *" + marshal_function + "(SpiceMarshaller *m, %s *msg" % target_type.c_type() + names_args + ");") |