forked from AuroraMiddleware/gtk
Don't do a lookup immediately after creating style->property_cache, since
Mon Sep 10 06:50:39 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkstyle.c (_gtk_style_peek_property_value): Don't do a lookup immediately after creating style->property_cache, since bsearch crashes on zero length for Solaris.
This commit is contained in:
parent
ca8cf02089
commit
ca004e1632
@ -1,3 +1,10 @@
|
||||
Mon Sep 10 06:50:39 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkstyle.c (_gtk_style_peek_property_value): Don't
|
||||
do a lookup immediately after creating style->property_cache,
|
||||
since bsearch crashes on zero length for Solaris.
|
||||
(Found by Padraig O'Briain.)
|
||||
|
||||
2001-09-09 Alexander Larsson <alla@lysator.liu.se>
|
||||
|
||||
* gtk/gtkwidget.c (_gtk_widget_peek_colormap):
|
||||
|
@ -1,3 +1,10 @@
|
||||
Mon Sep 10 06:50:39 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkstyle.c (_gtk_style_peek_property_value): Don't
|
||||
do a lookup immediately after creating style->property_cache,
|
||||
since bsearch crashes on zero length for Solaris.
|
||||
(Found by Padraig O'Briain.)
|
||||
|
||||
2001-09-09 Alexander Larsson <alla@lysator.liu.se>
|
||||
|
||||
* gtk/gtkwidget.c (_gtk_widget_peek_colormap):
|
||||
|
@ -1,3 +1,10 @@
|
||||
Mon Sep 10 06:50:39 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkstyle.c (_gtk_style_peek_property_value): Don't
|
||||
do a lookup immediately after creating style->property_cache,
|
||||
since bsearch crashes on zero length for Solaris.
|
||||
(Found by Padraig O'Briain.)
|
||||
|
||||
2001-09-09 Alexander Larsson <alla@lysator.liu.se>
|
||||
|
||||
* gtk/gtkwidget.c (_gtk_widget_peek_colormap):
|
||||
|
@ -1,3 +1,10 @@
|
||||
Mon Sep 10 06:50:39 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkstyle.c (_gtk_style_peek_property_value): Don't
|
||||
do a lookup immediately after creating style->property_cache,
|
||||
since bsearch crashes on zero length for Solaris.
|
||||
(Found by Padraig O'Briain.)
|
||||
|
||||
2001-09-09 Alexander Larsson <alla@lysator.liu.se>
|
||||
|
||||
* gtk/gtkwidget.c (_gtk_widget_peek_colormap):
|
||||
|
@ -1,3 +1,10 @@
|
||||
Mon Sep 10 06:50:39 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkstyle.c (_gtk_style_peek_property_value): Don't
|
||||
do a lookup immediately after creating style->property_cache,
|
||||
since bsearch crashes on zero length for Solaris.
|
||||
(Found by Padraig O'Briain.)
|
||||
|
||||
2001-09-09 Alexander Larsson <alla@lysator.liu.se>
|
||||
|
||||
* gtk/gtkwidget.c (_gtk_widget_peek_colormap):
|
||||
|
@ -1,3 +1,10 @@
|
||||
Mon Sep 10 06:50:39 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkstyle.c (_gtk_style_peek_property_value): Don't
|
||||
do a lookup immediately after creating style->property_cache,
|
||||
since bsearch crashes on zero length for Solaris.
|
||||
(Found by Padraig O'Briain.)
|
||||
|
||||
2001-09-09 Alexander Larsson <alla@lysator.liu.se>
|
||||
|
||||
* gtk/gtkwidget.c (_gtk_widget_peek_colormap):
|
||||
|
@ -1,3 +1,10 @@
|
||||
Mon Sep 10 06:50:39 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkstyle.c (_gtk_style_peek_property_value): Don't
|
||||
do a lookup immediately after creating style->property_cache,
|
||||
since bsearch crashes on zero length for Solaris.
|
||||
(Found by Padraig O'Briain.)
|
||||
|
||||
2001-09-09 Alexander Larsson <alla@lysator.liu.se>
|
||||
|
||||
* gtk/gtkwidget.c (_gtk_widget_peek_colormap):
|
||||
|
@ -1303,15 +1303,16 @@ _gtk_style_peek_property_value (GtkStyle *style,
|
||||
/* need value cache array */
|
||||
if (!style->property_cache)
|
||||
style->property_cache = g_array_new (FALSE, FALSE, sizeof (PropertyValue));
|
||||
|
||||
/* lookup, or insert value if not yet present */
|
||||
key.widget_type = widget_type;
|
||||
key.pspec = pspec;
|
||||
pcache = bsearch (&key,
|
||||
style->property_cache->data, style->property_cache->len,
|
||||
sizeof (PropertyValue), style_property_values_cmp);
|
||||
if (pcache)
|
||||
return &pcache->value;
|
||||
else
|
||||
{
|
||||
key.widget_type = widget_type;
|
||||
key.pspec = pspec;
|
||||
pcache = bsearch (&key,
|
||||
style->property_cache->data, style->property_cache->len,
|
||||
sizeof (PropertyValue), style_property_values_cmp);
|
||||
if (pcache)
|
||||
return &pcache->value;
|
||||
}
|
||||
|
||||
i = 0;
|
||||
while (i < style->property_cache->len &&
|
||||
|
Loading…
Reference in New Issue
Block a user