From 7abd5b99dd005d10c48692ae638671b7cac771e3 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 14 Nov 2011 17:05:55 +0100 Subject: [PATCH] another empty function murder --- src/include/surf/surf.h | 3 +-- src/simix/smx_deployment.c | 2 +- src/surf/surfxml_parse.c | 14 +++++--------- src/surf/surfxml_parseplatf.c | 2 +- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/include/surf/surf.h b/src/include/surf/surf.h index 8ac4782bb4..f1a883221d 100644 --- a/src/include/surf/surf.h +++ b/src/include/surf/surf.h @@ -672,8 +672,7 @@ XBT_PUBLIC(void) surf_exit(void); /* Prototypes of the functions that handle the properties */ XBT_PUBLIC_DATA(xbt_dict_t) current_property_set; /* the prop set for the currently parsed element (also used in SIMIX) */ -XBT_PUBLIC_DATA(void) parse_properties(const char* prop_id, const char* prop_value); -XBT_PUBLIC_DATA(void) parse_properties_XML(void); +XBT_PUBLIC(void) parse_properties(void); /* surf parse file related (public because called from a test suite) */ XBT_PUBLIC(void) parse_platform_file(const char *file); diff --git a/src/simix/smx_deployment.c b/src/simix/smx_deployment.c index 262790f4e6..2476a4b5d9 100644 --- a/src/simix/smx_deployment.c +++ b/src/simix/smx_deployment.c @@ -112,7 +112,7 @@ void SIMIX_launch_application(const char *file) surfxml_add_callback(STag_surfxml_process_cb_list, parse_process_init); surfxml_add_callback(ETag_surfxml_argument_cb_list, parse_argument); - surfxml_add_callback(STag_surfxml_prop_cb_list, parse_properties_XML); + surfxml_add_callback(STag_surfxml_prop_cb_list, parse_properties); surfxml_add_callback(ETag_surfxml_process_cb_list, parse_process_finalize); diff --git a/src/surf/surfxml_parse.c b/src/surf/surfxml_parse.c index 83a8612672..aec18201b2 100644 --- a/src/surf/surfxml_parse.c +++ b/src/surf/surfxml_parse.c @@ -566,19 +566,15 @@ static XBT_INLINE void surfxml_call_cb_functions(xbt_dynar_t cb_list) /* Prop tag functions */ -void parse_properties(const char* prop_id, const char* prop_value) -{ - if (!current_property_set) - current_property_set = xbt_dict_new(); // Maybe, it should raise an error - xbt_dict_set(current_property_set, prop_id, xbt_strdup(prop_value), free); -} - /** * With XML parser */ -void parse_properties_XML(void) +void parse_properties(void) { - parse_properties(A_surfxml_prop_id, A_surfxml_prop_value); + if (!current_property_set) + current_property_set = xbt_dict_new(); // Maybe, it should raise an error + + xbt_dict_set(current_property_set, A_surfxml_prop_id, xbt_strdup(A_surfxml_prop_value), free); } diff --git a/src/surf/surfxml_parseplatf.c b/src/surf/surfxml_parseplatf.c index f04585dd62..c8216efce5 100644 --- a/src/surf/surfxml_parseplatf.c +++ b/src/surf/surfxml_parseplatf.c @@ -137,7 +137,7 @@ void parse_platform_file(const char *file) surf_parse_reset_callbacks(); /* Register classical callbacks */ - surfxml_add_callback(STag_surfxml_prop_cb_list, &parse_properties_XML); + surfxml_add_callback(STag_surfxml_prop_cb_list, &parse_properties); routing_register_callbacks(); /* init the flex parser */ -- 2.20.1