mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
Merge branch 'remove-deprecated-girepository-flags' into 'main'
girepository: Remove GI_FUNCTION_THROWS and GI_VFUNC_THROWS flags See merge request GNOME/glib!3849
This commit is contained in:
commit
c92c1502d2
@ -140,9 +140,6 @@ gi_function_info_get_flags (GIFunctionInfo *info)
|
||||
if (blob->wraps_vfunc)
|
||||
flags = flags | GI_FUNCTION_WRAPS_VFUNC;
|
||||
|
||||
if (blob->throws)
|
||||
flags = flags | GI_FUNCTION_THROWS;
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
|
@ -441,7 +441,6 @@ typedef enum
|
||||
* @GI_VFUNC_MUST_CHAIN_UP: chains up to the parent type
|
||||
* @GI_VFUNC_MUST_OVERRIDE: overrides
|
||||
* @GI_VFUNC_MUST_NOT_OVERRIDE: does not override
|
||||
* @GI_VFUNC_THROWS: includes a [type@GLib.Error]
|
||||
*
|
||||
* Flags of a [class@GIRepository.VFuncInfo] struct.
|
||||
*
|
||||
@ -452,7 +451,6 @@ typedef enum
|
||||
GI_VFUNC_MUST_CHAIN_UP = 1 << 0,
|
||||
GI_VFUNC_MUST_OVERRIDE = 1 << 1,
|
||||
GI_VFUNC_MUST_NOT_OVERRIDE = 1 << 2,
|
||||
GI_VFUNC_THROWS = 1 << 3
|
||||
} GIVFuncInfoFlags;
|
||||
|
||||
/**
|
||||
@ -462,7 +460,6 @@ typedef enum
|
||||
* @GI_FUNCTION_IS_GETTER: is a getter of a [class@GIRepository.PropertyInfo].
|
||||
* @GI_FUNCTION_IS_SETTER: is a setter of a [class@GIRepository.PropertyInfo].
|
||||
* @GI_FUNCTION_WRAPS_VFUNC: represents a virtual function.
|
||||
* @GI_FUNCTION_THROWS: the function may throw an error.
|
||||
*
|
||||
* Flags for a [class@GIRepository.FunctionInfo] struct.
|
||||
*
|
||||
@ -475,7 +472,6 @@ typedef enum
|
||||
GI_FUNCTION_IS_GETTER = 1 << 2,
|
||||
GI_FUNCTION_IS_SETTER = 1 << 3,
|
||||
GI_FUNCTION_WRAPS_VFUNC = 1 << 4,
|
||||
GI_FUNCTION_THROWS = 1 << 5
|
||||
} GIFunctionInfoFlags;
|
||||
|
||||
G_END_DECLS
|
||||
|
@ -104,9 +104,6 @@ gi_vfunc_info_get_flags (GIVFuncInfo *info)
|
||||
if (blob->must_not_be_implemented)
|
||||
flags = flags | GI_VFUNC_MUST_NOT_OVERRIDE;
|
||||
|
||||
if (blob->throws)
|
||||
flags = flags | GI_VFUNC_THROWS;
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,6 @@ test_invoke_gerror (RepositoryFixture *fx,
|
||||
|
||||
func_info = GI_FUNCTION_INFO (gi_repository_find_by_name (fx->repository, "GLib", "file_read_link"));
|
||||
g_assert_nonnull (func_info);
|
||||
g_assert_true (gi_function_info_get_flags (func_info) & GI_FUNCTION_THROWS);
|
||||
g_assert_true (gi_callable_info_can_throw_gerror (GI_CALLABLE_INFO (func_info)));
|
||||
|
||||
in_arg[0].v_string = g_strdup ("non-existent-file/hope");
|
||||
@ -66,12 +65,10 @@ test_vfunc_can_throw_gerror (RepositoryFixture *fx,
|
||||
|
||||
invoker_info = gi_interface_info_find_method (interface_info, "launch");
|
||||
g_assert_nonnull (invoker_info);
|
||||
g_assert_true (gi_function_info_get_flags (invoker_info) & GI_FUNCTION_THROWS);
|
||||
g_assert_true (gi_callable_info_can_throw_gerror (GI_CALLABLE_INFO (invoker_info)));
|
||||
|
||||
vfunc_info = gi_interface_info_find_vfunc (interface_info, "launch");
|
||||
g_assert_nonnull (vfunc_info);
|
||||
g_assert_true (gi_vfunc_info_get_flags (vfunc_info) & GI_VFUNC_THROWS);
|
||||
g_assert_true (gi_callable_info_can_throw_gerror (GI_CALLABLE_INFO (vfunc_info)));
|
||||
|
||||
g_clear_pointer (&vfunc_info, gi_base_info_unref);
|
||||
|
Loading…
Reference in New Issue
Block a user