Re: [gtk-list] GLib 1.2.3: bug in g_idle_prepare



On Fri, 2 Jul 1999, Bernhard Herzog wrote:

> 
> I was just browsing through the sources, trying to understand how the
> mainloop is implemented, when I found this:
> 
> GLib 1.2.3, gmain.c, line 1323ff:
> 
> static gboolean 
> g_idle_prepare  (gpointer  source_data, 
> 		 GTimeVal *current_time,
> 		 gint     *timeout,
> 		 gpointer  user_data)
> {
>   timeout = 0;
>   return TRUE;
> }
> 
> 
> Surely, it should be 
> 
>   *timeout = 0; 
> 
> ?

thanx for catching this, timeout = 0 is obviously bogus, it should have
probably said *timeout = 0 as you already assumed. but then again, sources
that return TRUE from prepare() indicate that they'd like to get dispatched
immeditedly, so a timeout of 0 is assumed anyways.
so this function should actually read:

static gboolean 
g_idle_prepare  (gpointer  source_data, 
		 GTimeVal *current_time,
		 gint     *timeout,
		 gpointer  user_data)
{
  return TRUE;
}

> 
>   Bernhard
> 

---
ciaoTJ




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]