X-Git-Url: http://git.draconx.ca/gitweb/gob-dx.git/blobdiff_plain/308dc7bdfb924370cfd205f656eb0e83191d01a9..b3db2950b11fc5f3abd9ecdae855746e2d19c836:/src/util.c diff --git a/src/util.c b/src/util.c index 38dd535..de1d008 100644 --- a/src/util.c +++ b/src/util.c @@ -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"); +}