| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Annotation parser patch from: Tim Horton <hortont424@gmail.com>
If an explicit element type is specified, don't override it with
guint8.
|
|
|
|
|
| |
Since we're not writing out the zero-terminated flag now when
we shouldn't, update the tests too.
|
|
|
|
|
|
|
|
|
| |
This patch fixes our default handling of char **. We add Return
node types as a case where we test for array handling.
Remove the hardcoded assumption of array = "no transfer", just
use the separate Parameter/Return cases. This change causes
inout char ** to be transfer="full", but that seems more correct.
|
|
|
|
|
| |
Everything isn't a test for quite a while now, it's a public library.
So move it to gir/.
|
|
|
|
| |
We should be testing the Everything library as well.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we tried to guess what the "underscore version" of a class name
would be, but for classes like NMSetting8021x we'd guess "nm_setting8021x"
instead of "nm_setting_802_1x". All such guesses are subject to error:
instead let's try to use the prefix of the _get_type() method instead, and
only guess if that doesn't work.
We do this for both class names and when detecting methods. An additional
type with a "non-standard" underscored version (TestWi8021x) added to the
everything.[ch] test suite to test proper conversion.
GdkWindow and GObject have unusual get_type methods; add special quirks
to handle these (at least until the methods are renamed upstream).
(Slightly modified for PEP8 compliance by Colin Walters)
Signed-off-by: Colin Walters <walters@verbum.org>
|
| |
|
|
|
|
|
|
| |
We weren't checking the length of the input list, and we were erroneously
comparing every element in the test sequence against the *first* element
of the passed-in list.
|
| |
|
| |
|
|
|
|
| |
We needed to tweak a couple of the tests for correctness.
|
|
|
|
|
|
| |
Right now these annotations don't work; (out) is for callee-allocates.
For more information see
http://bugzilla.gnome.org/show_bug.cgi?id=573314
|
| |
|
| |
|
| |
|
|
|
|
|
| |
- Make the destroy-notfied callback test harder by retaining the
callbacks until test_callback_thaw_notifications() is called.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This allows to annotate cases where the heuristics don't work.
TODO: According to Juerbi, there are cases where two callbacks refer
to the same user_data, which is prohibited by the current
implementation.
Signed-off-by: Andreas Rottmann <a.rottmann@gmx.at>
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix compiler warnings:
- Missing return value in annotation-testing code
- Fix two function declarations to have a (void) parameter list --
this is not C++ ;-)
* Add tools/g-ir-scanner to .gitignore, as it's now generated
|
|
|
|
| |
Add support for the 'Rename To:' annotation for functions and methods.
|
|
|
|
|
|
|
| |
Parse the c:prefix from the .gir, include it in the header. Armed with this
information, we can now optimize lookups of GTypes because we
have the requirement that GTypes must start with the c:prefix. We do
fall back though if a lookup fails.
|
|
|
|
|
|
|
| |
This has a few use cases; the main one in mind right now is that
when we place this in the .typelib as well, we can use it to optimize
lookups based on GType names, by skipping entirely typelibs whose
c:prefix is not a prefix of the target type lookup.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some enums have members which have a common prefix which doesn't
match that of the enum name, but it also longer than the global
namespace prefix. Instead, try stripping the common prefix first,
and only if that fails fall back to the global strip.
Also, for glib-registered enums we were using the nick, which
typically has "-" as a separator. Replace that with "_" for
consistency between unregistered enums and registered.
utils.py:strip_common_prefix is now unused, delete.
|
|
|
|
|
|
| |
We previously supported (type) on signals only, extend it to all cases.
This is useful for a few cases where libraries use a superclass like GtkWidget*
for C convenience, where the actual type is a subclass.
|
|
|
|
|
|
|
|
|
|
|
|
| |
callback signature
Add a heuristic to the scanner that flags arguments of callbacks that
are named 'user_data' (exact match) and have a 'any (void*) type.
These arguments are marked by setting the 'closure' field of ArgBlob
to the index of themselves.
Signed-off-by: Andreas Rottmann <a.rottmann@gmx.at>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Add support for a `(type bitfield)' annotation for enums.
Signed-off-by: Andreas Rottmann <a.rottmann@gmx.at>
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
The change in commit 2912b broke the gjs test suite which was relying
on TestStructA being "simple" (i.e. only having primitive fields as members).
|
|
|
|
|
|
|
| |
We have more comprehensive testing in tests/scanner and tests/everything,
and these tests were designed from a time when we were trying to make
the g-ir-generate output exactly match the .gir, which has not been true
for some time and will not be in the future.
|
| |
|
|
|
|
|
|
|
| |
Add a signal and a "bare" member (i.e. a member without getter/setter)
to TestObj.
Signed-off-by: Andreas Rottmann <a.rottmann@gmx.at>
|
|
|
|
|
|
|
| |
This reverts commit 4470a24e8cf3827efaddcfe240c3271cf1a0d6c0.
Needs more work as it turns out, we need to figure out the binding
story.
|
|
|
|
|
|
|
| |
In order to determine whether a method is virtual, by default we look
at the class table to find a callback field. This should be fairly reliable,
but we may also later need annotations to more finely control this
in the case of a name clash with a signal.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Previously we just supported int and string, add double to this.
Technically we should probably differentiate between float and
double, but it's not likely to be very useful in practice to do so.
|
|
|
|
|
| |
We keep track of the source filename for every symbol. This enables
us to later filter symbols based on that name.
|
|
|
|
|
| |
girepository/ginvoke.c: handle the case where n_param_values == 0.
tests/invoke/genericmarshaller.c: add a test case for this.
|
|
|
|
|
| |
gvariant uses va_list *; we were previously skipping va_list, we should
skip indirect variants as well.
|
| |
|
| |
|
| |
|
|
|
|
| |
Which let's us focus on the important warnings.
|
|
|
|
|
| |
This option is for specifying inside the .gir what C header files should
be included by C consumers (as opposed to parsed by the scanner).
|
|
|
|
| |
This ensures we're stable on a macro level.
|
|\ |
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| |
| | |
This is needed when girepository-1.0 is not installed
and thus not in the library path.
|