mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-23 10:27:51 +02:00
garray: Add g_ptr_array_new_take() to take a C array without copies
GPtrArray is a nice interface to handle pointer arrays, however if a classic array needs to be converted into a GPtrArray is currently needed to manually go through all its elements and do new allocations that could be avoided. So add g_ptr_array_new_take() which steals the data from an array of pointers and allows to manage it using the GPtrArray API.
This commit is contained in:
@@ -2715,6 +2715,7 @@ g_ptr_array_new_with_free_func
|
||||
g_ptr_array_copy
|
||||
g_ptr_array_new_full
|
||||
g_ptr_array_new_null_terminated
|
||||
g_ptr_array_new_take
|
||||
g_ptr_array_set_free_func
|
||||
g_ptr_array_is_null_terminated
|
||||
g_ptr_array_ref
|
||||
|
Reference in New Issue
Block a user