mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
Merge branch 'g_array_free-free_seg' into 'main'
free_seg -> free_segment for g_array_free() and g_ptr_array_free() Closes #3508 See merge request GNOME/glib!4361
This commit is contained in:
commit
7ed7fe2867
@ -497,7 +497,7 @@ g_array_get_element_size (GArray *array)
|
|||||||
* the size of @array will be set to zero.
|
* the size of @array will be set to zero.
|
||||||
*
|
*
|
||||||
* If array contents point to dynamically-allocated memory, they should
|
* If array contents point to dynamically-allocated memory, they should
|
||||||
* be freed separately if @free_seg is %TRUE and no @clear_func
|
* be freed separately if @free_segment is %TRUE and no @clear_func
|
||||||
* function has been set for @array.
|
* function has been set for @array.
|
||||||
*
|
*
|
||||||
* This function is not thread-safe. If using a #GArray from multiple
|
* This function is not thread-safe. If using a #GArray from multiple
|
||||||
@ -1776,9 +1776,9 @@ g_ptr_array_unref (GPtrArray *array)
|
|||||||
/**
|
/**
|
||||||
* g_ptr_array_free:
|
* g_ptr_array_free:
|
||||||
* @array: a #GPtrArray
|
* @array: a #GPtrArray
|
||||||
* @free_seg: if %TRUE the actual pointer array is freed as well
|
* @free_segment: if %TRUE the actual pointer array is freed as well
|
||||||
*
|
*
|
||||||
* Frees the memory allocated for the #GPtrArray. If @free_seg is %TRUE
|
* Frees the memory allocated for the #GPtrArray. If @free_segment is %TRUE
|
||||||
* it frees the memory block holding the elements as well. Pass %FALSE
|
* it frees the memory block holding the elements as well. Pass %FALSE
|
||||||
* if you want to free the #GPtrArray wrapper but preserve the
|
* if you want to free the #GPtrArray wrapper but preserve the
|
||||||
* underlying array for use elsewhere. If the reference count of @array
|
* underlying array for use elsewhere. If the reference count of @array
|
||||||
@ -1786,10 +1786,10 @@ g_ptr_array_unref (GPtrArray *array)
|
|||||||
* size of @array will be set to zero.
|
* size of @array will be set to zero.
|
||||||
*
|
*
|
||||||
* If array contents point to dynamically-allocated memory, they should
|
* If array contents point to dynamically-allocated memory, they should
|
||||||
* be freed separately if @free_seg is %TRUE and no #GDestroyNotify
|
* be freed separately if @free_segment is %TRUE and no #GDestroyNotify
|
||||||
* function has been set for @array.
|
* function has been set for @array.
|
||||||
*
|
*
|
||||||
* Note that if the array is %NULL terminated and @free_seg is %FALSE
|
* Note that if the array is %NULL terminated and @free_segment is %FALSE
|
||||||
* then this will always return an allocated %NULL terminated buffer.
|
* then this will always return an allocated %NULL terminated buffer.
|
||||||
* If pdata is previously %NULL, a new buffer will be allocated.
|
* If pdata is previously %NULL, a new buffer will be allocated.
|
||||||
*
|
*
|
||||||
@ -1797,7 +1797,7 @@ g_ptr_array_unref (GPtrArray *array)
|
|||||||
* threads, use only the atomic g_ptr_array_ref() and g_ptr_array_unref()
|
* threads, use only the atomic g_ptr_array_ref() and g_ptr_array_unref()
|
||||||
* functions.
|
* functions.
|
||||||
*
|
*
|
||||||
* Returns: (transfer full) (nullable): the pointer array if @free_seg is
|
* Returns: (transfer full) (nullable): the pointer array if @free_segment is
|
||||||
* %FALSE, otherwise %NULL. The pointer array should be freed using g_free().
|
* %FALSE, otherwise %NULL. The pointer array should be freed using g_free().
|
||||||
*/
|
*/
|
||||||
gpointer*
|
gpointer*
|
||||||
|
@ -187,7 +187,7 @@ GPtrArray* g_ptr_array_new_from_null_terminated_array (gpointer *data,
|
|||||||
GDestroyNotify element_free_func);
|
GDestroyNotify element_free_func);
|
||||||
GLIB_AVAILABLE_IN_ALL
|
GLIB_AVAILABLE_IN_ALL
|
||||||
gpointer* g_ptr_array_free (GPtrArray *array,
|
gpointer* g_ptr_array_free (GPtrArray *array,
|
||||||
gboolean free_seg);
|
gboolean free_segment);
|
||||||
GLIB_AVAILABLE_IN_ALL
|
GLIB_AVAILABLE_IN_ALL
|
||||||
GPtrArray* g_ptr_array_ref (GPtrArray *array);
|
GPtrArray* g_ptr_array_ref (GPtrArray *array);
|
||||||
GLIB_AVAILABLE_IN_ALL
|
GLIB_AVAILABLE_IN_ALL
|
||||||
|
Loading…
Reference in New Issue
Block a user