| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Added in 9535fc48. After the switch it calls _g_ir_node_build_typelib() again
handling the other types.
|
|
|
|
|
|
|
| |
In case the surrounding code handles missing cases break, otherwise add
a g_assert_not_reached().
The generated parser code triggers this as well, so disable it there only.
|
| |
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=788087
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add "n_field_callbacks" to ObjectBlob which represents the number of object
fields which are also callbacks. This a allows a constant time computation
for accessing sections after fields. Track writing of this field by passing
an extra argument through the girnode writers recursive call structure. This
essentally reverts a portion of commit 7027bb256d0d1ab which added a linear
time computation for accessing sections after fields.
Update typelib validator to also ensure n_field_callbacks is properly set.
https://bugzilla.gnome.org/show_bug.cgi?id=700338
|
|
|
|
|
|
|
|
|
|
|
| |
Generalize "throws" attribute to SignatureBlob which can be used by all
callable blob types. Keep FunctionBlob and VFuncBlob throw attributes
around and functional for compatibility. Refactor girwriter.c to write
out throws attribute for all callable types.
Based on a patch by Simon Feltman.
https://bugzilla.gnome.org/show_bug.cgi?id=729543
|
|
|
|
|
|
|
|
|
|
|
| |
Knowing the ownership transfer for instance parameters is
necessary for correct memory management of functions which
"eat" their instance argument, such as g_dbus_method_invocation_return_*.
Parse this information from the gir file and store in the
typelib, and then provide new API on GICallableInfo to
retrieve this.
https://bugzilla.gnome.org/show_bug.cgi?id=729662
|
|
|
|
|
|
|
|
|
| |
Rename the "allow_none" parameter on internal/private structure ArgBlob
to "nullable".
This is a straight rename with no other changes.
https://bugzilla.gnome.org/show_bug.cgi?id=660879
|
|
|
|
|
|
|
|
| |
Aliasing TRUE or FALSE is not very common, but done occasionally
for extra clarity. Namely G_SOURCE_REMOVE / G_SOURCE_CONTINUE are
self-explanatory, unlike the "raw" booleans.
https://bugzilla.gnome.org/show_bug.cgi?id=719566
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=711541
|
|
|
|
|
|
|
|
|
|
| |
-Make code using libgirepository_internals relocatable on Windows,
like what is done in the GTK+ stack, and the girepository DLL.
-Remove C99isms
-"interface" is a reserved keyword on certain compilers, so change that to
"giinterface"
https://bugzilla.gnome.org/show_bug.cgi?id=681820
|
| |
|
|
|
|
|
|
|
|
| |
Virtual functions can definitely throw an error. Right now the
scanner omits the GError parameter for them and adds throws="1", but
g-ir-compiler ignores this.
https://bugzilla.gnome.org/show_bug.cgi?id=669332
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This uses the same backcompat machinery that was introduced for static
methods for non-class types, so this change does not break users of the
existing presentations.
New libgirepository API:
g_enum_info_get_n_methods
g_enum_info_get_method
https://bugzilla.gnome.org/show_bug.cgi?id=656499
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of storing the name of the function to call to get the
error quark, store the string form of the error quark, which
we derive from the introspection binary during scanning.
Update EnumBlob and GIEnumInfo to include the new information.
This will allow determining a back-mapping from error quark
to error domain without having to dlsym() and call all the
known error quark functions.
Based on earlier patches from Owen Taylor and Maxim Ermilov.
https://bugzilla.gnome.org/show_bug.cgi?id=602516
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous ErrorDomain blob was never actually scanned or used, and
it was kind of a lame API conceptually.
To keep some compatibility, rather than removing the enumeration
values, rename them to _INVALID, and don't bump the typelib version.
This should in theory allow a new libgirepository to read an old
typelib.
Based on a patch from Colin Walters
https://bugzilla.gnome.org/show_bug.cgi?id=602516
|
|
|
|
|
|
|
|
|
|
| |
We need to distinguish inline arrays inside structures, and arrays
that are pointers and annotations, and we can do it with
g_type_info_is_pointer(), setting it to FALSE for fixed size arrays.
As a side effect, (array fixed-size=N) on a pointer type has no longer
the expected result.
https://bugzilla.gnome.org/show_bug.cgi?id=646635
|
|
|
|
|
|
|
|
| |
This was discussed in bug 649657.
https://bugzilla.gnome.org/show_bug.cgi?id=649657
Signed-off-by: David Zeuthen <davidz@redhat.com>
|
|
|
|
|
|
|
|
| |
Different types of array have different type nodes, so they should
produce different keys in the cache of already seen type nodes, to
avoid turning a GByteArray into a reference to a GPtrArray.
https://bugzilla.gnome.org/show_bug.cgi?id=642300
|
|
|
|
|
| |
This should better avoid them being exported. Rename
girepository-parser.la to girepository-internals.la for clarity.
|
|
|
|
|
|
|
| |
Some API such as gtk_text_iter_get_char returns an individual
"gunichar"; we should support this.
https://bugzilla.gnome.org/show_bug.cgi?id=633197
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
This is a preparatory patch for adding a new basic tag.
|
|
|
|
|
|
|
|
|
| |
Rather than have the scanner/parser handle both e.g. "glong" and
"long", simply use the GLib types everywhere.
This commit adds TYPE_LONG_LONG and TYPE_LONG_DOUBLE to the
scanner types; however, rather than add them to the typelib,
they're just marked as not-introspectable.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We never actually include multiple modules in the compiler,
so just nuke that. Also rather than passing around GIrModule
consistently pass around a GIrTypelibBuild structure which
has various things.
This lets us maintain a stack there which we can walk for
better error messages.
Also, fix up the node lookup in giroffsets.c; previously
it didn't really handle includes correctly. We really need to
switch to always using Foo.Bar (i.e. GIName) names internally...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we had both e.g. GI_TYPE_TAG_LONG and GI_TYPE_TAG_INT64,
but in fact the typelib is already machine-specific, so it makes sense
to just encode this as a fixed type. The .gir remains abstract.
We also remove size_t from the typelib; one would never want to treat
it differently than an integer.
time_t is removed as well; while bindings like gjs had special handling
to turn it into e.g. a JS Date object, I don't think we should encourage
people to use these POSIX types in their API. Use GTimeVal or the like
instead.
Because the typelib is now really machine-specific, we need to remove
the -expected.tgirs from git. (We could potentially add a check
which wasn't just a literal diff later)
https://bugzilla.gnome.org/show_bug.cgi?id=623774
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds support for instantiable fundamental object types,
which are not GObject based. This is mostly interesting for being
able to support GstMiniObject's which are extensivly used in GStreamer.
Includes a big test case to the Everything module (inspired by
GstMiniObject) which should be used by language bindings who wishes to
test this functionallity.
This patch increases the size of the typelib and breaks compatibility
with older typelibs.
https://bugzilla.gnome.org/show_bug.cgi?id=568913
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Any annotation where the key has a dot in the name will go into the
attribute list. For example
* @arg: (foo.bar baz): some arg
the parameter @arg will get the attribute with key foo.bar and value
baz. This also works for.
* Returns: (foo.bar2 baz2): the return value
Also add tests for this new feature.
See https://bugzilla.gnome.org/show_bug.cgi?id=571548
Signed-off-by: David Zeuthen <davidz@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rectify an assumption that nodes are ordered according to offset
- since this assumption was not true, attributes ended up being not
ordered either and the bsearch() when looking up attributes failed
mysteriously. Instead of making such assumptions, simply sort the
list of nodes we want to extract attributes from.
The total attribute size computation was wrong as we didn't properly
descend into subnodes. This resulted in memory access violations
when writing the typelib (because not enough data was allocated).
Instead of having a separate function for this, just include the
attribute size in the existing function.
See https://bugzilla.gnome.org/show_bug.cgi?id=571548
Signed-off-by: David Zeuthen <davidz@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* girepository/*: Add g_property_info_get_ownership_transfer() and write
the transfer attribute of properties into the typelib.
* giscanner/*: Parse the (transfer) annotation and write it into the .gir.
* tools/generate.c: Read the transfer annotation for properties and write
to the .tgir.
https://bugzilla.gnome.org/show_bug.cgi?id=620484
|
|
|
|
|
| |
Rename gtypelib.h -> gitypelib-internal.h and rename
gtypelib.c to gitypelib.c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
People have wanted support for marking (out) on functions of the
form:
/**
* clutter_color_from_pixel:
* @pixel: A pixel
* @color: (out): Color to initialize with value of @pixel
*/
void
clutter_color_from_pixel (guint32 pixel, ClutterColor *color);
Where the caller is supposed to have allocated the argument; the
C function just initializes it. This patch adds support for this
argument passing style to introspection. In this case, we see the
(out), and notice that there's only a single indirection (*) on
the argument, and assume that this means (out caller-allocates).
https://bugzilla.gnome.org/show_bug.cgi?id=604749
|
|
|
|
|
|
|
|
| |
GArray args
Based on a previous patch by C. Scott Ananian <cscott@litl.com>
https://bugzilla.gnome.org/show_bug.cgi?id=581687
|
|
|
|
|
|
| |
properly scan GArray args"
This reverts commit 87291e08b0fd34b62e1ad9811c174108b38311a9.
|
|
|
|
|
|
|
|
| |
GArray args
Based on a previous patch by C. Scott Ananian <cscott@litl.com>
https://bugzilla.gnome.org/show_bug.cgi?id=581687
|
|
|
|
|
|
|
|
| |
Foreign structs are special in the sense that there might
be native bindings (for instance PyCairo for PyGI) that provides
the same functionallity as the introspected variant.
https://bugzilla.gnome.org/show_bug.cgi?id=610357
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Signed-off-by: Kedar Sovani <kedars@marvell.com>
https://bugzilla.gnome.org/show_bug.cgi?id=606139
|
|
|
|
|
|
| |
To make things really better we should track the line origin of
element from the .gir file (and actually we need to do better
checking in the scanner), but this is slightly less lame.
|
|
|
|
|
|
| |
gir: embed <callback> inside <field>
typelib: if a field contains a callback, store it just after the FieldBlob
girepository API: no additions
|
|
|
|
|
|
| |
Fixes a crash compiling GIRepository-2.0.gir.
http://bugzilla.gnome.org/show_bug.cgi?id=587823
|
|
|
|
|
| |
Patch by Brian Cameron <brian.cameron@sun.com>.
Fixes bug 578199.
|
|
|
|
|
|
|
|
|
| |
Add type tags for short and ushort, plus all of the requisite code needed
to utilize them in libgirepository.
Add support in the scanner's AST files.
Add test functions to the everything library and the expected gir file.
gtypelib.c constant validation fixed by Colin Walters <walters@verbum.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Broadly speaking, this change adds the concept of <vfunc> to the .gir.
The typelib already had most of the infrastructure for virtual functions,
though there is one API addition.
The scanner assumes that any class callback slot that doesn't match
a signal name is a virtual. In the .gir, we write out *both* the <method>
wrapper and a <vfunc>. If we can determine an association between
them (based on the names matching, or a new Virtual: annotation),
then we notate that in the .gir.
The typelib gains an association from the vfunc to the function, if
it exists. This will be useful for bindings since they already know
how to consume FunctionInfo.
|
|
|
|
|
|
|
|
| |
We now support an extensible mechanism where arbitrary key-value
pairs may be associated with almost all items, including objects,
methods, and properties.
These attributes appear in both the .gir and the .typelib.
|
|
|
|
| |
This will be useful for later changes which need to inspect the parent.
|
|
|
|
|
|
|
|
| |
Similar to GObject class structs, we pair up GInterfaces with
their C structures.
Also, move some GLib-specific things into glibast.py, and make
the naming more generic.
|
|
|
|
|
| |
This makes it easier to add more over time without changing lots
of unrelated code.
|