gtk.cfg: Add / improve g_str*() functions and add GTK_SIGNAL_FUNC().
This commit is contained in:
parent
9d8b965270
commit
974f01ce59
62
cfg/gtk.cfg
62
cfg/gtk.cfg
|
@ -7,6 +7,7 @@
|
|||
<define name="g_return_if_reached()" value="do{return;}while(0)"/>
|
||||
<define name="g_return_val_if_reached(val)" value="do{return val;}while(0)"/>
|
||||
<define name="G_CALLBACK(cb)" value="cb"/>
|
||||
<define name="GTK_SIGNAL_FUNC(f)" value="G_CALLBACK(f)"/>
|
||||
<!-- https://developer.gnome.org/glib/stable/glib-Miscellaneous-Macros.html -->
|
||||
<!-- https://github.com/GNOME/glib/blob/master/glib/gmacros.h -->
|
||||
<define name="G_GNUC_PURE" value="__attribute__((__pure__))"/>
|
||||
|
@ -2739,9 +2740,24 @@
|
|||
<leak-ignore/>
|
||||
<noreturn>false</noreturn>
|
||||
</function>
|
||||
<!-- gint g_strcasecmp (const gchar *s1, const gchar *s2); -->
|
||||
<function name="g_strcasecmp">
|
||||
<leak-ignore/>
|
||||
<noreturn>false</noreturn>
|
||||
<returnValue type="gint"/>
|
||||
<use-retval/>
|
||||
<warn severity="style">g_strcasecmp has been deprecated since version 2.2 and should not be used in newly-written code.</warn>
|
||||
<arg nr="1" direction="in">
|
||||
<not-null/>
|
||||
<not-uninit/>
|
||||
<strz/>
|
||||
</arg>
|
||||
<arg nr="2" direction="in">
|
||||
<not-null/>
|
||||
<not-uninit/>
|
||||
<strz/>
|
||||
<not-bool/>
|
||||
</arg>
|
||||
</function>
|
||||
<function name="g_strchomp">
|
||||
<leak-ignore/>
|
||||
|
@ -2751,9 +2767,37 @@
|
|||
<leak-ignore/>
|
||||
<noreturn>false</noreturn>
|
||||
</function>
|
||||
<!-- int g_strcmp0 (const char *str1, const char *str2); -->
|
||||
<function name="g_strcmp0">
|
||||
<leak-ignore/>
|
||||
<noreturn>false</noreturn>
|
||||
<returnValue type="int"/>
|
||||
<use-retval/>
|
||||
<arg nr="1" direction="in">
|
||||
<not-null/>
|
||||
<not-uninit/>
|
||||
<strz/>
|
||||
</arg>
|
||||
<arg nr="2" direction="in">
|
||||
<not-null/>
|
||||
<not-uninit/>
|
||||
<strz/>
|
||||
<not-bool/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- gchar * g_strconcat (const gchar *string1, ...); -->
|
||||
<function name="g_strconcat">
|
||||
<noreturn>false</noreturn>
|
||||
<returnValue type="gchar *"/>
|
||||
<use-retval/>
|
||||
<arg nr="1" direction="in">
|
||||
<not-null/>
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
<arg nr="variadic" direction="in">
|
||||
<not-uninit/>
|
||||
<not-bool/>
|
||||
</arg>
|
||||
</function>
|
||||
<function name="g_strdelimit">
|
||||
<leak-ignore/>
|
||||
|
@ -2779,9 +2823,27 @@
|
|||
<leak-ignore/>
|
||||
<noreturn>false</noreturn>
|
||||
</function>
|
||||
<!-- gint g_strncasecmp (const gchar *s1, const gchar *s2, guint n); -->
|
||||
<function name="g_strncasecmp">
|
||||
<leak-ignore/>
|
||||
<noreturn>false</noreturn>
|
||||
<returnValue type="gint"/>
|
||||
<use-retval/>
|
||||
<warn severity="style">g_strncasecmp has been deprecated since version 2.2 and should not be used in newly-written code.</warn>
|
||||
<arg nr="1" direction="in">
|
||||
<not-null/>
|
||||
<not-uninit/>
|
||||
<minsize type="argvalue" arg="3"/>
|
||||
</arg>
|
||||
<arg nr="2" direction="in">
|
||||
<not-null/>
|
||||
<not-uninit/>
|
||||
<minsize type="argvalue" arg="3"/>
|
||||
</arg>
|
||||
<arg nr="3" direction="in">
|
||||
<not-uninit/>
|
||||
<valid>0:</valid>
|
||||
</arg>
|
||||
</function>
|
||||
<function name="g_strreverse">
|
||||
<leak-ignore/>
|
||||
|
|
|
@ -46,6 +46,10 @@ void validCode(int argInt)
|
|||
GString * pGStr1 = g_string_new("test");
|
||||
g_string_append(pGStr1, "a");
|
||||
g_string_free(pGStr1, TRUE);
|
||||
|
||||
gchar * pGchar1 = g_strconcat("a", "b", NULL);
|
||||
printf("%s", pGchar1);
|
||||
g_free(pGchar1);
|
||||
}
|
||||
|
||||
void g_malloc_test()
|
||||
|
|
Loading…
Reference in New Issue