gtk.cfg: Add / improve g_string_*() function configurations.

daca@home reported missing configurations for most of them.
This commit is contained in:
versat 2019-04-01 15:33:27 +02:00
parent 5134fefb52
commit 9d8b965270
2 changed files with 146 additions and 2 deletions

View File

@ -4993,9 +4993,20 @@
<leak-ignore/> <leak-ignore/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
</function> </function>
<!-- GString * g_string_append (GString *string, const gchar *val); -->
<function name="g_string_append"> <function name="g_string_append">
<leak-ignore/> <leak-ignore/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
<returnValue type="GString *"/>
<arg nr="1" direction="inout">
<not-null/>
<not-uninit/>
</arg>
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
<not-bool/>
</arg>
</function> </function>
<function name="g_string_append_c"> <function name="g_string_append_c">
<leak-ignore/> <leak-ignore/>
@ -5005,9 +5016,22 @@
<leak-ignore/> <leak-ignore/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
</function> </function>
<!-- void g_string_append_printf (GString *string, const gchar *format, ...); -->
<function name="g_string_append_printf"> <function name="g_string_append_printf">
<leak-ignore/> <leak-ignore/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
<returnValue type="void"/>
<arg nr="1" direction="inout">
<not-null/>
<not-uninit/>
</arg>
<formatstr/>
<arg nr="2" direction="in">
<formatstr/>
<not-null/>
<not-uninit/>
<not-bool/>
</arg>
</function> </function>
<function name="g_string_append_unichar"> <function name="g_string_append_unichar">
<leak-ignore/> <leak-ignore/>
@ -5033,25 +5057,63 @@
<leak-ignore/> <leak-ignore/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
</function> </function>
<!-- GString * g_string_down (GString *string); -->
<function name="g_string_down"> <function name="g_string_down">
<leak-ignore/> <leak-ignore/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
<returnValue type="GString *"/>
<warn severity="style" reason="Obsolete" alternatives="g_string_ascii_down,g_utf8_strdown">g_string_down has been deprecated since version 2.2 and should not be used in newly-written code. This function uses the locale-specific tolower() function, which is almost never the right thing. Use g_string_ascii_down() or g_utf8_strdown() instead.</warn>
<arg nr="1" direction="inout">
<not-uninit/>
<not-bool/>
</arg>
</function> </function>
<!-- gboolean g_string_equal (const GString *v, const GString *v2); -->
<function name="g_string_equal"> <function name="g_string_equal">
<leak-ignore/> <leak-ignore/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
<returnValue type="gboolean"/>
<use-retval/>
<arg nr="1" direction="in">
<not-uninit/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
<not-bool/>
</arg>
</function> </function>
<function name="g_string_erase"> <function name="g_string_erase">
<leak-ignore/> <leak-ignore/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
</function> </function>
<function name="g_string_free_to_bytes"> <!-- gchar * g_string_free (GString *string, gboolean free_segment); -->
<leak-ignore/> <function name="g_string_free">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<returnValue type="gchar *"/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
</arg>
</function> </function>
<!-- GBytes * g_string_free_to_bytes (GString *string); -->
<function name="g_string_free_to_bytes">
<noreturn>false</noreturn>
<returnValue type="GBytes *"/>
<arg nr="1"/>
</function>
<!-- guint g_string_hash (const GString *str); -->
<function name="g_string_hash"> <function name="g_string_hash">
<leak-ignore/> <leak-ignore/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
<returnValue type="guint"/>
<use-retval/>
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<not-bool/>
</arg>
</function> </function>
<function name="g_string_insert"> <function name="g_string_insert">
<leak-ignore/> <leak-ignore/>
@ -5069,6 +5131,30 @@
<leak-ignore/> <leak-ignore/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
</function> </function>
<!-- GString * g_string_new (const gchar *init); -->
<function name="g_string_new">
<noreturn>false</noreturn>
<returnValue type="GString *"/>
<use-retval/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
</arg>
</function>
<!-- GString * g_string_new_len (const gchar *init, gssize len); -->
<function name="g_string_new_len">
<noreturn>false</noreturn>
<returnValue type="GString *"/>
<use-retval/>
<arg nr="1" direction="in">
<not-uninit/>
<minsize type="argvalue" arg="2"/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
<not-bool/>
</arg>
</function>
<function name="g_string_overwrite"> <function name="g_string_overwrite">
<leak-ignore/> <leak-ignore/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
@ -5101,13 +5187,67 @@
<leak-ignore/> <leak-ignore/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
</function> </function>
<!-- GString * g_string_sized_new (gsize dfl_size); -->
<function name="g_string_sized_new">
<noreturn>false</noreturn>
<returnValue type="GString *"/>
<use-retval/>
<arg nr="1" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
</function>
<!-- #define g_string_sprintf g_string_printf -->
<!-- This actually is a macro, but to benefit from the configuration possibilities it is configured as a function here. -->
<function name="g_string_sprintf">
<noreturn>false</noreturn>
<returnValue type="void"/>
<warn severity="style" reason="Obsolete" alternatives="g_string_printf">g_string_sprintf is deprecated and should not be used in newly-written code. This function has been renamed to g_string_printf().</warn>
<arg nr="1" direction="inout">
<not-null/>
<not-uninit/>
</arg>
<formatstr/>
<arg nr="2" direction="in">
<formatstr/>
<not-null/>
<not-uninit/>
<not-bool/>
</arg>
</function>
<!-- #define g_string_sprintfa g_string_append_printf -->
<!-- This actually is a macro, but to benefit from the configuration possibilities it is configured as a function here. -->
<function name="g_string_sprintfa">
<noreturn>false</noreturn>
<returnValue type="void"/>
<warn severity="style" reason="Obsolete" alternatives="g_string_append_printf">g_string_sprintfa is deprecated and should not be used in newly-written code. This function has been renamed to g_string_append_printf()</warn>
<arg nr="1" direction="inout">
<not-null/>
<not-uninit/>
</arg>
<formatstr/>
<arg nr="2" direction="in">
<formatstr/>
<not-null/>
<not-uninit/>
<not-bool/>
</arg>
</function>
<function name="g_string_truncate"> <function name="g_string_truncate">
<leak-ignore/> <leak-ignore/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
</function> </function>
<!-- GString * g_string_up (GString *string); -->
<function name="g_string_up"> <function name="g_string_up">
<leak-ignore/> <leak-ignore/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
<returnValue type="GString *"/>
<warn severity="style" reason="Obsolete" alternatives="g_string_ascii_up,g_utf8_strup">g_string_up has been deprecated since version 2.2 and should not be used in newly-written code. This function uses the locale-specific toupper() function, which is almost never the right thing. Use g_string_ascii_up() or g_utf8_strup() instead.</warn>
<arg nr="1" direction="inout">
<not-uninit/>
<not-bool/>
</arg>
</function> </function>
<function name="g_string_vprintf"> <function name="g_string_vprintf">
<leak-ignore/> <leak-ignore/>

View File

@ -42,6 +42,10 @@ void validCode(int argInt)
g_print("test"); g_print("test");
g_print("%d", 1); g_print("%d", 1);
g_printerr("err"); g_printerr("err");
GString * pGStr1 = g_string_new("test");
g_string_append(pGStr1, "a");
g_string_free(pGStr1, TRUE);
} }
void g_malloc_test() void g_malloc_test()