]> git.draconx.ca Git - gob-dx.git/blobdiff - src/util.c
Release 2.0.17
[gob-dx.git] / src / util.c
index 84ed63e482aec2a0b36cc1f0f3ecf7ad75ca70c9..86e44b88caec516ad053256321e2f9cc6b974ea1 100644 (file)
@@ -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 &&