GNOME Bugzilla – Bug 59254
g{u}int{8|16|32|64} gparam/gvalue support
Last modified: 2011-02-18 15:47:37 UTC
gobject lacks gparam/gvalue support for g{u}int{8|16|32|64}.
Created attachment 919 [details] [review] patch to fix the bug
http://mail.gnome.org/archives/gtk-devel-list/2001-August/msg00524.html Has an explanation of why 8/16/32 aren't really needed. And I'd agree that if we can keep the set of types down, we are doing better. 64-bit support would probably be nice, but at this point, I think we need to put that off until 2.2
Why can't g{u}int64 be added before 2.0? gstreamer uses off_t for byte offsets which need to be available via GParam. Natually off_t is 64bit, given the size of DVDs. i don't care about the other types, only 64-bit ints.
gint64 support in gobject params is critical for GStreamer, among other things. Timestamps must be 64-bit values because they are expressed in nanoseconds (so audio sample times are accurate). Without 64-bit support in glib, GStreamer will not be able to function. Period. The patch attached to this bug may go to far in creating all the smaller values, because I agree with the mail linked in, that's what the ranges are for. But because the vast majority of the world's machines are still 32 bit, 64-bit must be supported as an 'unusual' type. For machines that are already 64 bit, it may be compiled to be the usual 'int' type, because it would be. But it must exist in 2.0, or any project that relies on passing around large values will not be able to function without the end user applying a 3rd party patch to glib.
None of the other type names contain numbers so instead of g{u}int64, it is probably more consistant to use the names quad and uquad.
Created attachment 5610 [details] [review] add g{u}quad type to glib
Quad??? that is awful. ;-) INT64 - clear, concise, everyone knows what it is.
Under discussion on gtk-devel-list.
Sure, adding 64bits types to params wouldn't break binary compatibility (GtkArg is alread 64bits wide). Plus, it's required to work with gstreamer. Would be great to have this before 2.0.
Wed Oct 3 16:02:24 2001 Owen Taylor <otaylor@redhat.com> * glib-genmarshal.c gparamspecs.[ch] gvalue.h gobject/gvaluetypes.[ch]: Add support for G_TYPE_INT64 and storing it in GValue (Patch from Mathieu Lacage, #59254.)