X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=types%2Ftypes.c;h=1f93da4e245dba471d27ae5a5b314f905b05079c;hp=227a1e5e3125976730b79197a987e291e82a1714;hb=41253107837c6698a01af3133d11762302d8f9e5;hpb=9e29e16ee50d03cf4fdc0cea0220832323939dc3 diff --git a/types/types.c b/types/types.c index 227a1e5e..1f93da4e 100644 --- a/types/types.c +++ b/types/types.c @@ -445,18 +445,11 @@ struct definition_scope * return scope; } -/* - * Same as new_definition_scope, but reset the scope path. - */ -struct definition_scope * - new_dynamic_definition_scope(struct definition_scope *parent_scope, - GQuark field_name) +void set_dynamic_definition_scope(struct definition_scope *scope, + GQuark root_name) { - struct definition_scope *scope; - - scope = _new_definition_scope(parent_scope, 1); - g_array_index(scope->scope_path, GQuark, 0) = field_name; - return scope; + g_array_set_size(scope->scope_path, 1); + g_array_index(scope->scope_path, GQuark, 0) = root_name; } void free_definition_scope(struct definition_scope *scope)