]> git.draconx.ca Git - gob-dx.git/blobdiff - src/util.c
Release 2.0.13
[gob-dx.git] / src / util.c
index de1d008f9be49aa955741b92f1245a092af8d1d7..4d424402cfd651ef259f60408e37f580ed7f505f 100644 (file)
@@ -101,8 +101,18 @@ replace_sep(const char *base, char r)
        if (for_cpp && strstr (s, "::") != NULL)
                return s;
 
-       while((p=strchr(s,':')))
-               *p = r;
+       if (r == '\0') {
+               while ((p=strchr(s,':')) != NULL) {
+                       char *t = p;
+                       while (*t != '\0') {
+                               *t = *(t+1);
+                               t++;
+                       }
+               }
+       } else {
+               while ((p=strchr(s,':')) != NULL)
+                       *p = r;
+       }
        if(*s == r) {
                p = g_strdup(s+1);
                g_free(s);
@@ -258,7 +268,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 &&