The argument was called 'ctx' but the macro was using 'context'.
This wasn't causing the build to fail because the variable
'context' was already defined in all the scopes where this macro
was used.
Pull this down into introspection from gjs; this will allow us
to cache this better in the future (for example, by caching the
infos for interfaces in the info for the object).
https://bugzilla.gnome.org/show_bug.cgi?id=632924
Use the internal perfect hashing API to add an index to the directory.
To support this, add the notion of additional "sections" to the
typelib. A section index is inserted between the header and the
directory.
https://bugzilla.gnome.org/show_bug.cgi?id=554943
In multiple places in the typelib, but most importantly the directory,
we need some fast indexing. Perfect hashing, as implemented by CMPH
(previous commit), is an exact fit for the problem domain.
Add an API built on top of CMPH which maps strings->guint16 (we just
need a guint16 for the typelib index).
https://bugzilla.gnome.org/show_bug.cgi?id=554943
* Functions taking no parameters need to explicitly say (void).
* Mark some functions as static that are
* Comment out an unused function in bdz.c
* Change loop indicies "i" to be unsigned if our limit is unsigned
The C compiler will pick an enumeration type that accomodates the specified
values for the enumeration, so ignoring 64-bit enumerations, we can
have enumeration values from MININT32 to MAXUINT32. To handle this properly:
- Use gint64 for holding eumeration values when scanning
- Add a 'unsigned_value' bit to ValueBlob so we can distinguish the
int32 vs. uint32 cases in the typelib
- Change the return value of g_value_info_get_value() to gint64.
https://bugzilla.gnome.org/show_bug.cgi?id=629704
Previously we just were sloppy and didn't bother to accurately compute
signed/unsigned for enumeration types. But since we expect bindings
to decode a field value or function return value from an integer to
an enumeration they have know whether an integer value is
0xffffffff or -1, so we need to do the full computation.
https://bugzilla.gnome.org/show_bug.cgi?id=629704
Commit f97cc8687469f25752f79275 broke the lookup in
g_irepository_get_info; the passed offset is 0-based, then
we convert it to 1-based (and then back to 0 later...which needs
to be fixed).
This is a cleanup patch in preparation for future indexing
patches.
The lookup code was a mess trying to mash in the 3 different
cases of name, GType, and index into one mega-function.
Split it up properly, and move the core typelib internal-scanning
bits into gitypelib.c where it belongs.
Previously we bombed out if the minor version didn't match what
we expected; this was silly since the whole point of the minor
version is to enumerate compatible changes.
This helps us avoid a problematic case where in say jhbuild, using
a system (/usr/lib) glib, adding in -l girepository-1.0 will inject
-L /path/to/builddir, when we don't want that.
https://bugzilla.gnome.org/show_bug.cgi?id=630342
Documentation says about g_vfunc_get_offset():
"Obtain the offset of the function pointer in the class struct.
The value 0xFFFF indicates that the struct offset is unknown."
But g-ir-compiler did set the value to 0 when the offset is unknown.
This patch fixes it.
https://bugzilla.gnome.org/show_bug.cgi?id=628270