mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
use g_type_is_a() to check for object_type being a G_TYPE_OBJECT, not
Fri Mar 9 10:14:00 2001 Tim Janik <timj@gtk.org> * gparamspecs.c (g_param_spec_object): use g_type_is_a() to check for object_type being a G_TYPE_OBJECT, not G_TYPE_IS_OBJECT(), since that wouldn't allow interface types. * gtype.c (g_type_interface_add_prerequisite): arg, fixed small cnp bug with bad implications and an off-by-one error.
This commit is contained in:
@@ -156,6 +156,21 @@ Turns the argument into a string literal by using the '#' stringizing operator.
|
|||||||
|
|
||||||
@x: text to convert to a literal string.
|
@x: text to convert to a literal string.
|
||||||
|
|
||||||
|
<!-- ##### FUNCTION g_tree_lookup_extended ##### -->
|
||||||
|
<para>
|
||||||
|
Gets the original key and the associated value and a gboolean which is
|
||||||
|
TRUE if the key was found. This is useful if you need to free the memory
|
||||||
|
allocated for the original key, for example before calling g_tree_remove().
|
||||||
|
Since a #GTree is automatically balanced as key/value pairs are added,
|
||||||
|
key lookup is very fast.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@tree: a #GTree.
|
||||||
|
@lookup_key: the key to look up.
|
||||||
|
@orig_key: returns the original key.
|
||||||
|
@value: returns the value associated with the key.
|
||||||
|
@Returns: TRUE if the key was found in the #GTree.
|
||||||
|
|
||||||
<!-- ##### MACRO getcwd ##### -->
|
<!-- ##### MACRO getcwd ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
@@ -124,22 +124,6 @@ added, key lookup is very fast.
|
|||||||
@Returns: the value corresponding to the key.
|
@Returns: the value corresponding to the key.
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION g_tree_lookup_extended ##### -->
|
|
||||||
<para>
|
|
||||||
Gets the original key and the associated value and a gboolean which is
|
|
||||||
TRUE if the key was found. This is useful if you need to free the memory
|
|
||||||
allocated for the original key, for example before calling g_tree_remove().
|
|
||||||
Since a #GTree is automatically balanced as key/value pairs are added,
|
|
||||||
key lookup is very fast.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@tree: a #GTree.
|
|
||||||
@lookup_key: the key to look up.
|
|
||||||
@orig_key: returns the original key.
|
|
||||||
@value: returns the value associated with the key.
|
|
||||||
@Returns: TRUE if the key was found in the #GTree.
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION g_tree_search ##### -->
|
<!-- ##### FUNCTION g_tree_search ##### -->
|
||||||
<para>
|
<para>
|
||||||
Searches a #GTree using an alternative form of the comparison function.
|
Searches a #GTree using an alternative form of the comparison function.
|
||||||
|
@@ -1,3 +1,12 @@
|
|||||||
|
Fri Mar 9 10:14:00 2001 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gparamspecs.c (g_param_spec_object): use g_type_is_a() to check
|
||||||
|
for object_type being a G_TYPE_OBJECT, not G_TYPE_IS_OBJECT(), since
|
||||||
|
that wouldn't allow interface types.
|
||||||
|
|
||||||
|
* gtype.c (g_type_interface_add_prerequisite): arg, fixed small cnp bug
|
||||||
|
with bad implications and an off-by-one error.
|
||||||
|
|
||||||
Thu Mar 8 16:34:22 2001 Owen Taylor <otaylor@redhat.com>
|
Thu Mar 8 16:34:22 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gvaluetransform.c: Include <string.h> for memcpy.
|
* gvaluetransform.c: Include <string.h> for memcpy.
|
||||||
|
@@ -1587,7 +1587,7 @@ g_param_spec_object (const gchar *name,
|
|||||||
{
|
{
|
||||||
GParamSpecObject *ospec;
|
GParamSpecObject *ospec;
|
||||||
|
|
||||||
g_return_val_if_fail (G_TYPE_IS_OBJECT (object_type), NULL);
|
g_return_val_if_fail (g_type_is_a (object_type, G_TYPE_OBJECT), NULL);
|
||||||
|
|
||||||
ospec = g_param_spec_internal (G_TYPE_PARAM_OBJECT,
|
ospec = g_param_spec_internal (G_TYPE_PARAM_OBJECT,
|
||||||
name,
|
name,
|
||||||
|
@@ -1141,7 +1141,7 @@ g_type_interface_add_prerequisite (GType interface_type,
|
|||||||
|
|
||||||
G_WRITE_LOCK (&type_rw_lock);
|
G_WRITE_LOCK (&type_rw_lock);
|
||||||
iface = lookup_type_node_L (interface_type);
|
iface = lookup_type_node_L (interface_type);
|
||||||
prerequisite_node = lookup_type_node_L (interface_type);
|
prerequisite_node = lookup_type_node_L (prerequisite_type);
|
||||||
if (!iface || !prerequisite_node || !NODE_IS_IFACE (iface))
|
if (!iface || !prerequisite_node || !NODE_IS_IFACE (iface))
|
||||||
{
|
{
|
||||||
g_warning ("interface type `%s' or prerequisite type `%s' invalid",
|
g_warning ("interface type `%s' or prerequisite type `%s' invalid",
|
||||||
@@ -1164,7 +1164,7 @@ g_type_interface_add_prerequisite (GType interface_type,
|
|||||||
{
|
{
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
for (i = 0; i < prerequisite_node->n_supers; i++)
|
for (i = 0; i < prerequisite_node->n_supers + 1; i++)
|
||||||
type_iface_add_prerequisite_W (iface, lookup_type_node_L (prerequisite_node->supers[i]));
|
type_iface_add_prerequisite_W (iface, lookup_type_node_L (prerequisite_node->supers[i]));
|
||||||
}
|
}
|
||||||
else if (NODE_IS_IFACE (prerequisite_node))
|
else if (NODE_IS_IFACE (prerequisite_node))
|
||||||
|
Reference in New Issue
Block a user