mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-24 11:12:11 +01:00
Merge branch '1492-cast-function-type-warning' into 'master'
glist: Mention -Wcast-function-type problems with g_*list_copy_deep() Closes #1492 See merge request GNOME/glib!253
This commit is contained in:
commit
ec4da774e5
@ -649,8 +649,10 @@ g_list_copy (GList *list)
|
||||
* container itself.
|
||||
*
|
||||
* @func, as a #GCopyFunc, takes two arguments, the data to be copied
|
||||
* and a @user_data pointer. It's safe to pass %NULL as user_data,
|
||||
* if the copy function takes only one argument.
|
||||
* and a @user_data pointer. On common processor architectures, it's safe to
|
||||
* pass %NULL as @user_data if the copy function takes only one argument. You
|
||||
* may get compiler warnings from this though if compiling with GCC’s
|
||||
* `-Wcast-function-type` warning.
|
||||
*
|
||||
* For instance, if @list holds a list of GObjects, you can do:
|
||||
* |[<!-- language="C" -->
|
||||
|
@ -557,9 +557,11 @@ g_slist_copy (GSList *list)
|
||||
* In contrast with g_slist_copy(), this function uses @func to make a copy of
|
||||
* each list element, in addition to copying the list container itself.
|
||||
*
|
||||
* @func, as a #GCopyFunc, takes two arguments, the data to be copied and a user
|
||||
* pointer. It's safe to pass #NULL as user_data, if the copy function takes only
|
||||
* one argument.
|
||||
* @func, as a #GCopyFunc, takes two arguments, the data to be copied
|
||||
* and a @user_data pointer. On common processor architectures, it's safe to
|
||||
* pass %NULL as @user_data if the copy function takes only one argument. You
|
||||
* may get compiler warnings from this though if compiling with GCC’s
|
||||
* `-Wcast-function-type` warning.
|
||||
*
|
||||
* For instance, if @list holds a list of GObjects, you can do:
|
||||
* |[<!-- language="C" -->
|
||||
@ -571,7 +573,7 @@ g_slist_copy (GSList *list)
|
||||
* g_slist_free_full (another_list, g_object_unref);
|
||||
* ]|
|
||||
*
|
||||
* Returns: a full copy of @list, use #g_slist_free_full to free it
|
||||
* Returns: a full copy of @list, use g_slist_free_full() to free it
|
||||
*
|
||||
* Since: 2.34
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user