girffi: Rename gi_function_invoker_destroy() to …_clear()

This brings its naming more in line with modern GLib conventions.

This is an API break, but libgirepository is not API frozen yet.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall 2024-01-23 18:12:48 +00:00
parent 3e157c688e
commit 9b5d008f60
3 changed files with 5 additions and 5 deletions

View File

@ -269,7 +269,7 @@ gi_callable_info_get_ffi_return_type (GICallableInfo *callable_info)
* by a language binding could contain a [type@GIRepository.FunctionInvoker]
* structure inside the bindings function mapping.
*
* @invoker must be freed using [method@GIRepository.FunctionInvoker.destroy]
* @invoker must be freed using [method@GIRepository.FunctionInvoker.clear]
* when its finished with.
*
* Returns: `TRUE` on success, `FALSE` otherwise with @error set.
@ -342,7 +342,7 @@ gi_function_invoker_new_for_address (void *addr,
}
/**
* gi_function_invoker_destroy:
* gi_function_invoker_clear:
* @invoker: (transfer none): A #GIFunctionInvoker
*
* Release all resources allocated for the internals of @invoker.
@ -353,7 +353,7 @@ gi_function_invoker_new_for_address (void *addr,
* Since: 2.80
*/
void
gi_function_invoker_destroy (GIFunctionInvoker *invoker)
gi_function_invoker_clear (GIFunctionInvoker *invoker)
{
g_free (invoker->cif.arg_types);
}

View File

@ -108,7 +108,7 @@ gboolean gi_function_invoker_new_for_address (void *addr,
GError **error);
GI_AVAILABLE_IN_ALL
void gi_function_invoker_destroy (GIFunctionInvoker *invoker);
void gi_function_invoker_clear (GIFunctionInvoker *invoker);
GI_AVAILABLE_IN_ALL

View File

@ -66,7 +66,7 @@ test_function_info_invoker (void)
gi_function_info_prep_invoker (function_info, &invoker, &local_error);
g_assert_no_error (local_error);
gi_function_invoker_destroy (&invoker);
gi_function_invoker_clear (&invoker);
g_clear_pointer (&function_info, gi_base_info_unref);
g_clear_object (&repository);