Re: gtk_events_pending return value



On Mon, 2004-01-05 at 23:05, Johannes Weißl wrote:
> On 2004-01-06 05:06:21, Christer Palm wrote:
> > gtk_events_pending() returns the number of pending events. Whether 
> > knowing the actual number of pending events is useful or not I don't 
> > know, but there you have it.
> 
> no, here's the gtk-code:
> 
> gint
> gtk_events_pending (void)
> {
>   gboolean result;
> 
>   GDK_THREADS_LEAVE ();
>   result = g_main_context_pending (NULL);
>   GDK_THREADS_ENTER ();
> 
>   return result;
> }
> 
> so the result can only be TRUE or FALSE ...

>From glib/gtypes.h:

typedef gint gboolean;

gboolean is just a convenience type.  Nothing in that snippet of code
forces result into being only 0 or 1.

--
Shaun





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