mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 10:04:32 +03:00
glibcompat: remove g_direct_equal shim
This function is present at least in glib-2.43.92: ../../lib/glibcompat.c:69:1: error: static declaration of 'g_direct_equal' follows non-static declaration 69 | g_direct_equal (gconstpointer v1, gconstpointer v2) | ^~~~~~~~~~~~~~ In file included from /home/zaytsev/opt/glib/include/glib-2.0/glib.h:50, from ../../lib/global.h:10, from ../../lib/glibcompat.c:36: /home/zaytsev/opt/glib/include/glib-2.0/glib/ghash.h:180:10: note: previous declaration of 'g_direct_equal' was here 180 | gboolean g_direct_equal (gconstpointer v1, | ^~~~~~~~~~~~~~ Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
This commit is contained in:
parent
bda4e480d2
commit
335c5a78bb
@ -48,30 +48,6 @@
|
|||||||
/*** file scope functions ************************************************************************/
|
/*** file scope functions ************************************************************************/
|
||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#if ! GLIB_CHECK_VERSION (2, 54, 0)
|
|
||||||
/**
|
|
||||||
* g_direct_equal:
|
|
||||||
* @v1: (nullable): a key
|
|
||||||
* @v2: (nullable): a key to compare with @v1
|
|
||||||
*
|
|
||||||
* Compares two #gpointer arguments and returns %TRUE if they are equal.
|
|
||||||
* It can be passed to g_hash_table_new() as the @key_equal_func
|
|
||||||
* parameter, when using opaque pointers compared by pointer value as
|
|
||||||
* keys in a #GHashTable.
|
|
||||||
*
|
|
||||||
* This equality function is also appropriate for keys that are integers
|
|
||||||
* stored in pointers, such as `GINT_TO_POINTER (n)`.
|
|
||||||
*
|
|
||||||
* Returns: %TRUE if the two keys match.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
g_direct_equal (gconstpointer v1, gconstpointer v2)
|
|
||||||
{
|
|
||||||
return v1 == v2;
|
|
||||||
}
|
|
||||||
#endif /* ! GLIB_CHECK_VERSION (2, 54, 0) */
|
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
/*** public functions ****************************************************************************/
|
/*** public functions ****************************************************************************/
|
||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
Loading…
Reference in New Issue
Block a user