| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
We don't want to pollute the global namespace with our private
libraries. Also, this sidesteps all the craziness that is happening
with OS vendors changing how Python installs modules.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
Allow a documentation block to have options, e.g.:
/*
* SomeType: (OPT-NAME VALUE) ...
*/
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.
|
|
|
|
|
|
|
| |
This reverts commit 4470a24e8cf3827efaddcfe240c3271cf1a0d6c0.
Needs more work as it turns out, we need to figure out the binding
story.
|
|
|
|
|
|
|
|
| |
Make the callback grouping heuristic more lax: consider all pointer
parameters ending in 'data' to be the user_data parameter (instead of
requiring an exact 'user_data' name).
Signed-off-by: Andreas Rottmann <a.rottmann@gmx.at>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
| |
This fixes a cache issue where the pickle in the cache doesn't
have self._pkgconfig_packages set in its instance
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This makes the dumper not fail for people who set $CC to e.g. "distcc gcc".
|
|
|
|
|
| |
We keep track of the source filename for every symbol. This enables
us to later filter symbols based on that name.
|
|
|
|
|
| |
gvariant uses va_list *; we were previously skipping va_list, we should
skip indirect variants as well.
|
|
|
|
|
| |
Avoids a compilation warning (unused function)
in the generated lexer output.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
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 gives us nice stack traces.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to reference the get_type() functions we are going to dlsym
or otherwise the linker may not include them in the introspection
binary.
giscanner/dumper.py: Accept a list of _get_type() functions
and write an array referencing them into the introspection
binary.
giscanner/glibtransformer.py: Break parsing into too stages -
the stage where we compute the _get_type() functions and the
stage where we invoke the introspection binary.
tools/g-ir-scanner: Pass _get_type() functions from the
scanner when creating the introspection binary.
http://bugzilla.gnome.org/show_bug.cgi?id=572075
|
|
|
|
|
| |
This fixes the build on Hurd. If anyone ever actually uses Hurd with
filenames longer than 4096, they can open a new bug.
|
|
|
|
| |
This ensures we're stable on a macro level.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
gtk-doc treats tags like 'Return value:' or 'Since:' as case-insensitive,
do the same to make things as predictable as possibe and avoid strange
problems where a 'Return Value:' tag work with gtk-doc but not
g-ir-scanner.
http://bugzilla.gnome.org/show_bug.cgi?id=572086
|
|\ \
| |/ |
|
| |
| |
| |
| | |
This is really why you shouldn't catch TypeError.
|
|/
|
|
|
|
|
|
|
|
| |
When generating a .gir file, we now first parse all of our .gir includes
to pick up their <package> headers. Then, we merge that with the set of
--pkg arguments passed to us, run pkg-config to gather the arguments,
and finally save the merged pkg-config list to our new .gir file.
This is useful for software which needs to map from .gir to pkg-config
in a programmatic way.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inside glibtransformer, we now look at structures ending in "Class" and
see if they have an associated GlibObject (i.e. a structure of the same
name without the "Class" suffix). If found, pair them up.
The .gir file for <class> gains an attribute denoting its associated
class struct. Any <record> many now have a glib:is-class-struct-for
annotation which tells which (if any) <class> for which it defines the
layout.
In the .typelib, we record the association between the class and
its structure. Generic structures however just have a boolean
saying whether they're a class struct. (Going from a generic class
struct to its class should not be necessary).
Finally, we expose GIRepository APIs to access both bits of information
from the .typelib.
svn path=/trunk/; revision=1088
|
|
|
|
|
|
| |
This enables us to support "hidden" parent classes.
svn path=/trunk/; revision=1087
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Patch from Andreas Rottmann <a.rottmann@gmx.at>.
* tests/scanner/utility.h (UtilityTaggedValue): Make the union
member anonymous.
(UtilityByte): New union typedef with an unnamed struct in it.
* giscanner/transformer.py (Transformer._create_struct): Create
unnamed structs for symbols with a None ident.
(Transformer._create_union): Likewise.
* giscanner/girwriter.py (GIRWriter._write_record): Allow name
being None.
(GIRWriter._write_union): Likewise.
* girepository/girparser.c (start_struct): Allow a NULL name for
non-toplevel structs.
(start_union): Likewise.
* tests/scanner/utility.h (UtilityTaggedValue): New struct
typedef, which has a nested union member.
* tests/scanner/utility-expected.gir: Adapted.
* giscanner/transformer.py (Transformer._create_member): Create
struct/union members if appropriate.
(Transformer._create_struct, Transformer._create_union): Allow for
structs/unions without a C type.
* giscanner/glibtransformer.py (GLibTransformer._resolve_field):
We don't need to resolve non-typef'd
(GLibTransformer._resolve_field): Add cases for non-typedef'd
struct/union "fields".
* giscanner/girwriter.py (GIRWriter._write_record): Allow for
records without a C type.
(GIRWriter._write_field): structs and unions may appear in places
where fields do.
svn path=/trunk/; revision=1082
|
|
|
|
|
|
|
|
| |
The scanner misses all fields of the GObject struct -- there
are no <field> children of the <class> element for GObject in the GIR. This of
course yields wrong field offsets for all derived objects.
svn path=/trunk/; revision=1079
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* giscanner/scannerparser.y: Fix the "Ignoring non-UTF-8 constant
string" error to print the right value.
* tests/scanner/annotation.c (backslash_parsing_tester)
(backslash_parsing_tester_2): make these non-static to avoid a
warning.
(annotation_object_string_out)
(annotation_string_zero_terminated): fix return values
* tests/scanner/annotation.h (annotation_object_with_voidp):
prototype this
* tests/scanner/gtkfrob.c:
* tests/scanner/gtkfrob.h (gtk_frob_language_manager_get_default):
fix prototype. (s/()/(void)/).
* tools/compiler.c (format_output): fix signed/unsigned warning.
Output a prototype for register_typelib() to avoid warnings later.
svn path=/trunk/; revision=1071
|
|
|
|
|
|
|
| |
g_object_get_type hasn't always been in GObject, we handle it internally
elsewhere.
svn path=/trunk/; revision=1065
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-01-21 Johan Dahlin <jdahlin@async.com.br>
Bug 562622 – Errordomains missing
* giscanner/girwriter.py:
* giscanner/glibast.py:
* giscanner/glibtransformer.py:
* tests/scanner/Makefile.am:
* tests/scanner/foo-1.0-expected.gir:
* tests/scanner/foo-1.0-expected.tgir:
* tests/scanner/foo.c (foo_error_get_type), (foo_error_quark):
* tests/scanner/foo.h:
svn path=/trunk/; revision=1057
|
|
|
|
|
|
|
|
|
|
|
| |
2009-01-20 Johan Dahlin <jdahlin@async.com.br>
* giscanner/scannerlexer.l:
Increase the buffer size to 1M, so
gtkalias.h can be parsed.
svn path=/trunk/; revision=1056
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-01-20 Johan Dahlin <jdahlin@async.com.br>
* giscanner/glibtransformer.py:
When trying to map functions to structs, do
not require a public structure to exist, should
fix Gst gir generation in.
svn path=/trunk/; revision=1055
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-01-20 Johan Dahlin <jdahlin@async.com.br>
Bug 562615 – Struct methods missing
* giscanner/annotationparser.py:
* giscanner/ast.py:
* giscanner/girwriter.py:
* giscanner/glibast.py:
* giscanner/glibtransformer.py:
* tests/scanner/foo-1.0-expected.gir:
* tests/scanner/foo-1.0-expected.tgir:
svn path=/trunk/; revision=1054
|
|
|
|
| |
svn path=/trunk/; revision=1053
|
|
|
|
| |
svn path=/trunk/; revision=1052
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-01-15 Johan Dahlin <jdahlin@async.com.br>
* gir/freetype2-2.0.gir: add FT_Int32
* gir/xft-2.0.gir: add XftFont
* girepository/gdump.c (g_irepository_dump):
Report errors when an invalid type is encountered
* giscanner/glibtransformer.py:
Make the error message a bit nicer.
Part of preparating for gir generating inside pango.
svn path=/trunk/; revision=1050
|