From 9c9b4645536fb4b73ff347cb088fda3bc482b022 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Sat, 3 Jul 2010 12:57:50 -0700 Subject: Implement upb_deflist_qualify. --- src/upb_def.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/upb_def.c b/src/upb_def.c index 07781c6..b0347ce 100644 --- a/src/upb_def.c +++ b/src/upb_def.c @@ -52,11 +52,14 @@ static upb_string *upb_join(upb_string *base, upb_string *name) { return joined; } - +// Qualify the defname for all defs starting with offset "start" with "str". static void upb_deflist_qualify(upb_deflist *l, upb_string *str, int32_t start) { - (void)l; - (void)str; - (void)start; + for(uint32_t i = start; i < l->len; i++) { + upb_def *def = l->defs[i]; + upb_string *name = def->fqname; + def->fqname = upb_join(str, name); + upb_string_unref(name); + } } /* upb_def ********************************************************************/ -- cgit v1.2.3