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);
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 &&
return str;
}
+char *
+make_me_type (const char *type, const char *alt)
+{
+ if (type == NULL)
+ return g_strdup (alt);
+ /* HACK! just in case someone made this
+ * work with 2.0.0 by using the TYPE
+ * macro directly */
+ if ((strstr (type, "_TYPE_") != NULL ||
+ strstr (type, "TYPE_") == type) &&
+ strchr (type, ':') == NULL)
+ return g_strdup (type);
+ return make_pre_macro (type, "TYPE");
+}