Wireshark-dev: Re: [Wireshark-dev] Rev 51084 causes the 32-bit x86 OS X build to fail, as it ha
Isn't copying them into Wireshark if not in glib the easiest? New file(s) in epan or wsutil?
ws_hash_func.[ch]?
--------------------------
#if GLIB_CHECK_VERSION(2,22,0)
/**
* g_int64_equal:
* @v1: a pointer to a #gint64 key
* @v2: a pointer to a #gint64 key to compare with @v1
*
* Compares the two #gint64 values being pointed to and returns
* %TRUE if they are equal.
* It can be passed to g_hash_table_new() as the @key_equal_func
* parameter, when using non-%NULL pointers to 64-bit integers as keys in a
* #GHashTable.
*
* Returns: %TRUE if the two keys match.
*
* Since: 2.22
*/
gboolean
g_int64_equal (gconstpointer v1,
gconstpointer v2)
{
return *((const gint64*) v1) == *((const gint64*) v2);
}
/**
* g_int64_hash:
* @v: a pointer to a #gint64 key
*
* Converts a pointer to a #gint64 to a hash value.
*
* It can be passed to g_hash_table_new() as the @hash_func parameter,
* when using non-%NULL pointers to 64-bit integer values as keys in a
* #GHashTable.
*
* Returns: a hash value corresponding to the key.
*
* Since: 2.22
*/
guint
g_int64_hash (gconstpointer v)
{
return (guint) *(const gint64*) v;
}
#endif /* GLIB_CHECK_VERSION(2,22,0) */
----------------- .h file ------------
gboolean g_int64_equal (gconstpointer v1,
gconstpointer v2);
guint g_int64_hash (gconstpointer v);
/Anders
-----Original Message-----
From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Guy Harris
Sent: den 2 augusti 2013 09:13
To: wireshark-dev@xxxxxxxxxxxxx
Subject: [Wireshark-dev] Rev 51084 causes the 32-bit x86 OS X build to fail, as it has an older version of GLib
On Aug 1, 2013, at 1:11 PM, etxrab@xxxxxxxxxxxxx wrote:
> http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=51084
>
> User: etxrab
> Date: 2013/08/01 01:11 PM
>
> Log:
> Use glibs hastables rather than home grown variants for manuf an wka(well known addresses).
g_int64_hash() and g_int64_equal() first appear in GLib 2.22; we'll either have to require that as the minimum version of GLib, copy those into Wireshark if they're not in GLib, or use a different hash function.
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe