X-Git-Url: https://git.draconx.ca/gitweb/gob-dx.git/blobdiff_plain/4cda31fc14f41746b4f3ced7015f9f15e0168dfc..5d4e3f65125a1e67702b7fbd4096d5e2fd3ec798:/src/util.c diff --git a/src/util.c b/src/util.c index 84ed63e..86e44b8 100644 --- a/src/util.c +++ b/src/util.c @@ -81,13 +81,17 @@ remove_sep(const char *base) { char *p; char *s = g_strdup(base); + char *q=s; /* don't eat C++ :: thingies */ if (for_cpp && strstr (s, "::") != NULL) return s; - while((p = strchr(s, ':'))) - strcpy(p, p+1); + for(p=(char *)base;*p;p++){ + if (*p!=':') + *q++=*p; + } + *q='\0'; return s; } @@ -268,7 +272,10 @@ get_cast (const char *type, gboolean simple_only) init_type_hash (); - gtype = g_hash_table_lookup (type_hash, type); + if(strncmp(type, "BOXED_", 6) == 0) + gtype = g_hash_table_lookup (type_hash, "BOXED"); + else + gtype = g_hash_table_lookup (type_hash, type); if (gtype == NULL || (simple_only &&