summaryrefslogtreecommitdiff
path: root/girepository/giroffsets.c
Commit message (Collapse)AuthorAgeFilesLines
* Add "storage type" to the typelib data for enumsOwen Taylor2008-11-181-9/+54
| | | | | | | | | | | | | | | | | | | | | In order to set and get enum and flag fields in structures, we need to know the integral type that the enumeration is stored as. We are already computing that at compile time in order to compute struct offsets, so the easiest thing to do is to save that in the typelib. * docs/typelib-format.txt girepository/girnode.[ch] girepository/giroffsets.c girepository/gtypelib.h: Add 'storage_type' to the typelib format for EnumBlob and compute and save it at compile time. * girepository/girepository.h girepository/ginfo.c: Add g_enum_info_get_storage_type(). * girepository/gfield.c: Implement reading and writing enum and flags fields based on the storage type. http://bugzilla.gnome.org/show_bug.cgi?id=561296 svn path=/trunk/; revision=944
* Compute field offsets and overall size for object structuresOwen Taylor2008-11-111-0/+21
| | | | | | | | | | | | | | | 2008-11-11 Owen Taylor <otaylor@redhat.com> Compute field offsets and overall size for object structures Bug 560326 – Fails to build Gtk-2.0.typelib with "Unexpected non-pointer field of type object in structure" Do basic computation of field offsets for objects and interfaces; this doesn't attempt to address all of the "mess" for virtual functions described in Bug 560281. svn path=/trunk/; revision=888
* Include fully-qualified names in all error messages.Owen Taylor2008-11-111-18/+26
| | | | | | | | | 2008-11-11 Owen Taylor <otaylor@redhat.com> * girepository/giroffsets.c: Include fully-qualified names in all error messages. svn path=/trunk/; revision=884
* Fail gracefully with an informative error message when recursion isOwen Taylor2008-11-111-5/+29
| | | | | | | | | | 2008-11-11 Owen Taylor <otaylor@redhat.com> * girepository/giroffsets.c: Fail gracefully with an informative error message when recursion is encountered when computing a structure size. svn path=/trunk/; revision=882
* Bug 560252 - Compute field offsets before writing typelibOwen Taylor2008-11-111-0/+413
girnode.h: Store the total size and alignment for GIrNodeStruct/Boxed/Union. giroffset.c: New file implementing computation of structure field offsets. girnode.c: Compute structure field offsets before writing types into the typelib. docs/typelib-format.txt: Document that a field offset of 0xFFFF means "unknown". Also fix description of the discriminator_offset field for unions. svn path=/trunk/; revision=876