mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-31 06:13:29 +02:00
strfuncs: add g_set_str()
This is like our other suite of g_set_*() based APIs to simplify and improve correctness of setters for fields, properties, and more. This implementation specifically handles setting string values that may point to an offset within the current string by copying before free. strcmp() is used directly (as opposed to g_strcmp0() due to it being in gtestutils.h as well as to increase the chance that the compiler will hoist the implementation. Fixes #2747
This commit is contained in:
committed by
Philip Withnall
parent
96d623843f
commit
49ae9b490d
@@ -1464,6 +1464,7 @@ utimbuf
|
||||
<TITLE>String Utility Functions</TITLE>
|
||||
<FILE>string_utils</FILE>
|
||||
<INCLUDE>glib.h,glib/gprintf.h</INCLUDE>
|
||||
g_set_str
|
||||
g_strdup
|
||||
g_strndup
|
||||
g_strdupv
|
||||
|
Reference in New Issue
Block a user