+Thu May 10 15:19:01 2001 Tim Janik <timj@gtk.org>
+
+ * gscanner.c (g_scanner_key_hash): use g_str_hash() algorithm
+ to generate hashes.
+
+ * gmem.c (standard_calloc): free() doesn't return a value
+ (Mark Murnane).
+
2001-04-26 Havoc Pennington <hp@redhat.com>
* configure.in: Get rid of --enable-msg-prefix
+Thu May 10 15:19:01 2001 Tim Janik <timj@gtk.org>
+
+ * gscanner.c (g_scanner_key_hash): use g_str_hash() algorithm
+ to generate hashes.
+
+ * gmem.c (standard_calloc): free() doesn't return a value
+ (Mark Murnane).
+
2001-04-26 Havoc Pennington <hp@redhat.com>
* configure.in: Get rid of --enable-msg-prefix
+Thu May 10 15:19:01 2001 Tim Janik <timj@gtk.org>
+
+ * gscanner.c (g_scanner_key_hash): use g_str_hash() algorithm
+ to generate hashes.
+
+ * gmem.c (standard_calloc): free() doesn't return a value
+ (Mark Murnane).
+
2001-04-26 Havoc Pennington <hp@redhat.com>
* configure.in: Get rid of --enable-msg-prefix
+Thu May 10 15:19:01 2001 Tim Janik <timj@gtk.org>
+
+ * gscanner.c (g_scanner_key_hash): use g_str_hash() algorithm
+ to generate hashes.
+
+ * gmem.c (standard_calloc): free() doesn't return a value
+ (Mark Murnane).
+
2001-04-26 Havoc Pennington <hp@redhat.com>
* configure.in: Get rid of --enable-msg-prefix
+Thu May 10 15:19:01 2001 Tim Janik <timj@gtk.org>
+
+ * gscanner.c (g_scanner_key_hash): use g_str_hash() algorithm
+ to generate hashes.
+
+ * gmem.c (standard_calloc): free() doesn't return a value
+ (Mark Murnane).
+
2001-04-26 Havoc Pennington <hp@redhat.com>
* configure.in: Get rid of --enable-msg-prefix
+Thu May 10 15:19:01 2001 Tim Janik <timj@gtk.org>
+
+ * gscanner.c (g_scanner_key_hash): use g_str_hash() algorithm
+ to generate hashes.
+
+ * gmem.c (standard_calloc): free() doesn't return a value
+ (Mark Murnane).
+
2001-04-26 Havoc Pennington <hp@redhat.com>
* configure.in: Get rid of --enable-msg-prefix
+Thu May 10 15:19:01 2001 Tim Janik <timj@gtk.org>
+
+ * gscanner.c (g_scanner_key_hash): use g_str_hash() algorithm
+ to generate hashes.
+
+ * gmem.c (standard_calloc): free() doesn't return a value
+ (Mark Murnane).
+
2001-04-26 Havoc Pennington <hp@redhat.com>
* configure.in: Get rid of --enable-msg-prefix
+Thu May 10 15:19:01 2001 Tim Janik <timj@gtk.org>
+
+ * gscanner.c (g_scanner_key_hash): use g_str_hash() algorithm
+ to generate hashes.
+
+ * gmem.c (standard_calloc): free() doesn't return a value
+ (Mark Murnane).
+
2001-04-26 Havoc Pennington <hp@redhat.com>
* configure.in: Get rid of --enable-msg-prefix
static void
standard_free (gpointer mem)
{
- return free (mem);
+ free (mem);
}
static gpointer
standard_calloc (gsize n_blocks,
h = key->scope_id;
for (c = key->symbol; *c; c++)
- {
- guint g;
-
- h = (h << 4) + *c;
- g = h & 0xf0000000;
- if (g)
- {
- h = h ^ (g >> 24);
- h = h ^ g;
- }
- }
+ h = (h << 5) - h + *c;
return h;
}
static void
standard_free (gpointer mem)
{
- return free (mem);
+ free (mem);
}
static gpointer
standard_calloc (gsize n_blocks,
+Thu May 10 14:00:48 2001 Tim Janik <timj@gtk.org>
+
+ * gparamspecs.[hc]: removed g_param_spec_stringc() in lack of
+ evidence of public need.
+
+ * gsignal.h: added g_signal_disconnect_by_func(),
+ g_signal_block_by_func() and g_signal_unblock_by_func() convenience
+ macros as per owen's request.
+
+ * gtype.c (SIZEOF_FUNDAMENTAL_INFO): align sizeof (GTypeFundamentalInfo)
+ to size of longs and pointers.
+
2001-05-05 James Henstridge <james@daa.com.au>
* Makefile.am: glib-mkenums is not a compiled program, so shouldn't
return G_PARAM_SPEC (sspec);
}
-GParamSpec*
-g_param_spec_stringc (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- const gchar *default_value,
- GParamFlags flags)
-{
- GParamSpecString *sspec = g_param_spec_internal (G_TYPE_PARAM_STRING,
- name,
- nick,
- blurb,
- flags);
- g_free (sspec->default_value);
- sspec->default_value = g_strdup (default_value);
- g_free (sspec->cset_first);
- sspec->cset_first = g_strdup (G_CSET_a_2_z "_" G_CSET_A_2_Z);
- g_free (sspec->cset_nth);
- sspec->cset_nth = g_strdup (G_CSET_a_2_z
- "_0123456789"
- /* G_CSET_LATINS G_CSET_LATINC */
- G_CSET_A_2_Z);
-
- return G_PARAM_SPEC (sspec);
-}
-
GParamSpec*
g_param_spec_param (const gchar *name,
const gchar *nick,
const gchar *blurb,
const gchar *default_value,
GParamFlags flags);
-GParamSpec* g_param_spec_stringc (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- const gchar *default_value,
- GParamFlags flags);
GParamSpec* g_param_spec_param (const gchar *name,
const gchar *nick,
const gchar *blurb,
/* --- convenience --- */
#define g_signal_connectc(instance, detailed_signal, c_handler, data, swapped) \
g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, (swapped), FALSE)
-
+#define g_signal_disconnect_by_func(instance, func, data) \
+ g_signal_handlers_disconnect_matched ((instance), G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, \
+ 0, 0, NULL, (func), (data))
+#define g_signal_block_by_func(instance, func, data) \
+ g_signal_handlers_block_matched ((instance), G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, \
+ 0, 0, NULL, (func), (data))
+#define g_signal_unblock_by_func(instance, func, data) \
+ g_signal_handlers_unblock_matched ((instance), G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, \
+ 0, 0, NULL, (func), (data))
+
/*< private >*/
void g_signal_handlers_destroy (gpointer instance);
void _g_signals_destroy (GType itype);
G_TYPE_FLAG_DERIVABLE | \
G_TYPE_FLAG_DEEP_DERIVABLE)
#define TYPE_FLAG_MASK (G_TYPE_FLAG_ABSTRACT | G_TYPE_FLAG_VALUE_ABSTRACT)
+#define SIZEOF_FUNDAMENTAL_INFO ((gssize) MAX (MAX (sizeof (GTypeFundamentalInfo), \
+ sizeof (gpointer)), \
+ sizeof (glong)))
/* --- typedefs --- */
static_type_nodes[ftype] = g_renew (TypeNode*, static_type_nodes[ftype], 1 << g_bit_storage (static_branch_seqnos[ftype] - 1));
if (!pnode)
- node_size += sizeof (GTypeFundamentalInfo); /* fundamental type info */
+ node_size += SIZEOF_FUNDAMENTAL_INFO; /* fundamental type info */
node_size += SIZEOF_BASE_TYPE_NODE (); /* TypeNode structure */
node_size += (sizeof (GType) * (1 + n_supers + 1)); /* self + ancestors + 0 for ->supers[] */
node = g_malloc0 (node_size);
if (!pnode) /* offset fundamental types */
- node = G_STRUCT_MEMBER_P (node, sizeof (GTypeFundamentalInfo));
+ node = G_STRUCT_MEMBER_P (node, SIZEOF_FUNDAMENTAL_INFO);
static_type_nodes[ftype][branch_last] = node;
node->n_supers = n_supers;
if (ftype != NODE_TYPE (node))
node = lookup_type_node_L (ftype);
- return node ? G_STRUCT_MEMBER_P (node, - (gssize) sizeof (GTypeFundamentalInfo)) : NULL;
+ return node ? G_STRUCT_MEMBER_P (node, - SIZEOF_FUNDAMENTAL_INFO) : NULL;
}
static TypeNode*
h = key->scope_id;
for (c = key->symbol; *c; c++)
- {
- guint g;
-
- h = (h << 4) + *c;
- g = h & 0xf0000000;
- if (g)
- {
- h = h ^ (g >> 24);
- h = h ^ g;
- }
- }
+ h = (h << 5) - h + *c;
return h;
}