mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 23:16:14 +01:00
Remove deprecated API
There's no point in releasing a new library with deprecated API.
This commit is contained in:
parent
b3dfaf5e97
commit
ba24fc659d
@ -445,60 +445,3 @@ g_callable_info_destroy_closure (GICallableInfo *callable_info,
|
||||
g_free (wrapper->ffi_closure.cif->arg_types);
|
||||
ffi_closure_free (wrapper->writable_self);
|
||||
}
|
||||
|
||||
/**
|
||||
* g_callable_info_prepare_closure:
|
||||
* @callable_info: a callable info from a typelib
|
||||
* @cif: a ffi_cif structure
|
||||
* @callback: the ffi callback
|
||||
* @user_data: data to be passed into the callback
|
||||
*
|
||||
* Prepares a callback for ffi invocation.
|
||||
*
|
||||
* Deprecated: 1.72: Use g_callable_info_create_closure() instead
|
||||
*
|
||||
* Returns: the native address of the closure or `NULL` on error. The return value
|
||||
* should be freed by calling g_callable_info_free_closure().
|
||||
*/
|
||||
ffi_closure *
|
||||
g_callable_info_prepare_closure (GICallableInfo *callable_info,
|
||||
ffi_cif *cif,
|
||||
GIFFIClosureCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
ffi_closure * closure;
|
||||
|
||||
closure = g_callable_info_create_closure (callable_info, cif, callback, user_data);
|
||||
if (!closure)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Return the native pointer which, on some systems and ffi versions without static exec trampolines,
|
||||
* points to the same underlying memory as closure, but via an executable-non-writable mapping.
|
||||
* Deprecated, and kept for backwards compatibility only. Risks segfaults on freeing the closure.
|
||||
*/
|
||||
return (ffi_closure *) g_callable_info_get_closure_native_address(callable_info, closure);
|
||||
}
|
||||
|
||||
/**
|
||||
* g_callable_info_free_closure:
|
||||
* @callable_info: a callable info from a typelib
|
||||
* @closure: ffi closure
|
||||
*
|
||||
* Deprecated: 1.72: Use g_callable_info_destroy_closure() instead, in
|
||||
* conjunction with g_callable_info_create_closure().
|
||||
*
|
||||
* Should free a ffi_closure returned from g_callable_info_prepare_closure(),
|
||||
* which may cause a segfault because the native address is returned instead of
|
||||
* the closure address. May do nothing and leak memory instead of freeing to
|
||||
* avoid segfaults.
|
||||
*/
|
||||
void
|
||||
g_callable_info_free_closure (GICallableInfo *callable_info,
|
||||
ffi_closure *closure)
|
||||
{
|
||||
#ifdef LEGACY_GIRFFI_FREE
|
||||
g_callable_info_destroy_closure(callable_info, closure);
|
||||
#endif
|
||||
}
|
||||
|
@ -101,17 +101,6 @@ GI_AVAILABLE_IN_ALL
|
||||
void g_function_invoker_destroy (GIFunctionInvoker *invoker);
|
||||
|
||||
|
||||
GI_DEPRECATED_IN_2_72_FOR(g_callable_info_create_closure)
|
||||
ffi_closure * g_callable_info_prepare_closure (GICallableInfo *callable_info,
|
||||
ffi_cif *cif,
|
||||
GIFFIClosureCallback callback,
|
||||
gpointer user_data);
|
||||
|
||||
GI_DEPRECATED_IN_2_72_FOR(g_callable_info_destroy_closure)
|
||||
void g_callable_info_free_closure (GICallableInfo *callable_info,
|
||||
ffi_closure *closure);
|
||||
|
||||
|
||||
GI_AVAILABLE_IN_2_72
|
||||
ffi_closure * g_callable_info_create_closure (GICallableInfo *callable_info,
|
||||
ffi_cif *cif,
|
||||
|
Loading…
Reference in New Issue
Block a user