| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
retval should be a valid pointer
https://bugzilla.gnome.org/show_bug.cgi?id=604472
|
|
|
|
|
| |
This will make it easier for third-party projects to use
introspection by having easy make rules.
|
|
|
|
|
|
| |
Makes sure we can parse empty tags such as '@foo:' without
adding a : in the end which the typelib compiler will complain
about
|
| |
|
|
|
|
|
|
|
|
| |
GAsyncReadyCallback should have use the async scope per
default and GDestroyNotify should be notified if the
previous parameters are a callback and user data.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=602862
|
|
|
|
|
|
|
|
| |
Previously it only worked for toplevel nodes. Now it works for any
node except <field>, since skipping a field would cause the
description of the struct layout to be wrong.
https://bugzilla.gnome.org/show_bug.cgi?id=602652
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=602672
|
|
|
|
|
|
| |
gir: embed <callback> inside <field>
typelib: if a field contains a callback, store it just after the FieldBlob
girepository API: no additions
|
|
|
|
|
|
|
|
|
|
| |
Calling _resolve_param_type on a string instead of Node is fairly unusual,
and (as far as I could see) basically only happened in the Array processing
code. We were passing None as the ctype in this case, but we might as well
try using the name as a ctype too.
This fixes using GCallback (and in general any item in an array that comes
from an included gir).
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=599327
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=599327
|
| |
|
|
|
|
|
| |
Adds a (skip) option that can be added to the header of any doc comment
to cause that symbol to be skipped in the .gir output
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thanks to commit 6d510b8db, we now no longer need LD_LIBRARY_PATH
to be set for invoking the compiler.
Next, before we were taking the LD_LIBRARY_PATH variable and
turning it into a compile path, presumably to attempt to handle
the cases where we weren't getting the right -L flags. Also
interacting with this was a while ago we weren't really doing
uninstalled libtool libraries correctly, which is probably
how hacks involving LD_LIBRARY_PATH crept into the scanner.
Just require that we're passed the right -L flags, and we
should be doing libtool libraries better now.
|
|
|
|
|
|
|
| |
With recent merges, a few instances of $(builddir) got reintroduced.
Remove them.
http://bugzilla.gnome.org/show_bug.cgi?id=592114
|
|
|
|
| |
The last few commits regressed 'check'; fix those up.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In addition to the current --library=<foo>, support --library=lib<foo>.la.
This makes it unambiguous that we are referencing an uninstalled
library and allows accurate extraction of the shared library name
for the uninstalled library.
* tests/scanner/Makefile.am tests/offsets/Makefile.am: Use the
new form of --library=. Also some LD_LIBRARY_PATH frobbing as needed.
*-expected.gir *-expected.tgir: We now pick out the shared library
accurately, so fix shared-library="" in our reference girs. (The
comparison may need some pre-sanitization now to work on non-ELF)
http://bugzilla.gnome.org/show_bug.cgi?id=591669
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using ctypes.util.find_library() to resolve library names to
sonames causes problems with dealing with uninstalled libtool
operation properly. We're unlikely to find any way of combining
the two that will be robust against future changes in both
facilities.
Switch to a different approach - run 'ldd' on the compiled
introspection binary and extract sonames from there This is
less portable but should be quite robust where it works.
utils.py dumper.py: Move libtool-command-line finding into utils.py
girwriter.py: Remove library name resolution from here, expect libraries
to be passed in preresolved.
shlibs.py scannermain.py: New file including resolve_shlibs() to resolve
library names using the introspection binary.
tests/scanner/Makefile.am: Add .libs to LD_LIBRARY_PATH
http://bugzilla.gnome.org/show_bug.cgi?id=591669
|
|
|
|
|
|
|
|
| |
$(builddir) is not a standard automake variable. With autoconf < 2.64
it ends up getting set in every Makefile.in to '.' (because autoconf
defines it), but that is no longer the case for 2.64.
Since $(builddir) was always '.', just use that instead.
|
|
|
|
| |
Shave is just way too invasive in the build system.
|
|
|
|
|
|
|
| |
We want to extend $LD_LIBRARY_PATH from the front so that uninstalled
libraries take precedence over installed libraries.
http://bugzilla.gnome.org/show_bug.cgi?id=591740
|
|
|
|
| |
Plain fields (i.e. non-callbacks) may have a 'type' annotation now.
|
|
|
|
|
|
|
| |
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.
|