]> git.draconx.ca Git - gob-dx.git/blobdiff - src/util.c
Release 2.0.8
[gob-dx.git] / src / util.c
index 38dd53547b3cdf70bd423b39501040e4dde4f304..de1d008f9be49aa955741b92f1245a092af8d1d7 100644 (file)
@@ -390,3 +390,17 @@ gob_strdown (char *str)
        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");
+}