Re: [gtk-list] Re: How to use a gpointer?
- From: Hrvoje Niksic <hniksic srce hr>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: How to use a gpointer?
- Date: 09 Mar 1999 13:04:15 +0100
john@giorgio.hart.bbk.ac.uk writes:
> dave@srce.hr wrote:
> >I've noticed that some functions have `guint32 time'
> >argument. I didn't check the sources, but I suppose that the OS and X
> >libraries handle this one as a time_t type.
> >Will this break a 64 bit GTK application?
>
> It's the time field from an X event, so it's 32 bits.
Really? Even in 64-bit environments? That would be strange indeed.
If we're talking about the type that X calls `Time' (the type normally
used in X event structures, which Gtk "wisely" assigns to guint32),
then it's definitely 64-bit on 64-bit systems.
#ifndef _XSERVER64
[...]
typedef unsigned long Time;
#else
[...]
typedef CARD32 Time;
#endif
This program prints 4 if compiled with `cc', and 8 if compiled with
`cc -xarch=v9'.
#include <stdio.h>
#include <X11/X.h>
main ()
{
printf ("%d\n", sizeof (Time));
}
On Digital Unix it prints 4 unconditionally, which means that *any*
assumption on what the size of Time is will be wrong on one system or
the other. The same stands true for most usages of Gtk+ g* types.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]