| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Macro constants may now refer to constants defined in source files.
Test case provided by Philip Chimento.
Fixes issues #173 and #75.
|
|
|
|
|
|
|
|
|
|
| |
This updates the test headers and sources to decorate the symbols with the
macro that can be used to export the symbols, and include config.h first in
the c-sources so that the macro can be defined with the compiler directive
to export the symbols. Update the CFLAGS as well so that the header that
defines the export decoration macro can be found.
https://bugzilla.gnome.org/show_bug.cgi?id=732669
|
|
|
|
|
|
|
|
| |
We want to warn on unnamed params in declarations to ensure that
all functions are bindable. Thus, we need to move a test containing
unnamed params to WarnLib so it can be tested.
https://bugzilla.gnome.org/show_bug.cgi?id=693098
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=693097
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the scanner found a function with _new in its name, but not
prefixed by the name of a known type, it would assume that the
function was a constructor, and then complain that it couldn't figure
out what it was a constructor for, and mark it introspectable=0.
Instead, just assume that the function is not actually a constructor
in that case (unless it's explicitly tagged as such).
https://bugzilla.gnome.org/show_bug.cgi?id=676815
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- add missing colons
- invalid annotations
- invalid parameters and tags
- correct parameter name
- preserve description indentation
- no description parts
- comment end marker
- invalid empty lines
- line numbers
AnnotationParser now emits warnings which are considered as
errors by "make check" so fix those warnings...
https://bugzilla.gnome.org/show_bug.cgi?id=672254
|
|
|
|
|
|
|
| |
6172c268 made the scanner think GObject* wasn't a superclass of its
subclasses. Fix that.
https://bugzilla.gnome.org/show_bug.cgi?id=661677
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of just handling static methods for classes, handle them for:
- Records and boxed
- Unions
- Interfaces
Based on a patch by Owen Taylor.
https://bugzilla.gnome.org/show_bug.cgi?id=572408
|
|
|
|
| |
Signed-off-by: David Zeuthen <davidz@redhat.com>
|
|
|
|
|
|
|
|
| |
This was discussed in bug 649657.
https://bugzilla.gnome.org/show_bug.cgi?id=649657
Signed-off-by: David Zeuthen <davidz@redhat.com>
|
|
|
|
|
|
|
| |
For that we also need to read the annotations for foreign structs
before guessing the transfer mode of return values.
https://bugzilla.gnome.org/show_bug.cgi?id=629188
|
| |
|
|
|
|
|
| |
If the first parameter matches the origin, don't scan as a constructor.
Happened in practice with meta_screen_append_new_workspace from mutter.
|
|
|
|
| |
See test case, hit in practice in gnome-shell.
|
|
|
|
|
|
|
|
|
| |
Commit b6fb70f9 wrongly disabled fatal warnings - in fact there
is a way to make this test case work, and it was a bug in the
scanner not processing virtual function annotations correctly.
Add a different test case for un-named parameters that doesn't
have a callback.
|
|
|
|
|
|
|
| |
Add a test case and disable fatal warnings since there's
currently no way to avoid the warning(s)
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=628567
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First of all, add missing (transfer) annotations that will be
required by the new scanner.
Other changes:
Don't use the (type bitfield) hack; the new scanner will not accept it.
Use shifts in the flag constants instead.
Use typedefs consistently for structures.
Drop scanning of anonymous structure/union members.
|
|
|
|
|
|
|
| |
This makes type parsing more uniform.
Delete the typedef for GSList in foo.h - that's not
supported anymore, or at least for now.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=619450
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
gvariant uses va_list *; we were previously skipping va_list, we should
skip indirect variants as well.
|
|
|
|
|
|
|
|
|
|
|
| |
2009-02-10 Rober Carr <carrr@rpi.edu>
Bug 569633 – Typelib compiler fails with vararg callbacks
* girepository/girparser.c: Also filter out callback functions
which take vararg arguments.
svn path=/trunk/; revision=1095
|
|
|
|
|
|
| |
This enables us to support "hidden" parent classes.
svn path=/trunk/; revision=1087
|
|
|
|
| |
svn path=/trunk/; revision=1086
|
|
|
|
| |
svn path=/trunk/; revision=1077
|
|
|
|
|
|
|
|
| |
* girepository/girparser.c: post_filter_varargs_functions
should also filter callbacks.
* tests/scanner/foo.h: Add tests of varargs callbacks.
svn path=/trunk/; revision=1075
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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-12 Johan Dahlin <jdahlin@async.com.br>
Bug 563591 – Flags not recognized when there is no introspection data
* giscanner/ast.py:
* giscanner/girwriter.py:
* giscanner/giscannermodule.c (type_get_is_bitfield):
* giscanner/glibast.py:
* giscanner/glibtransformer.py:
* giscanner/scannerparser.y:
* giscanner/sourcescanner.c (gi_source_type_copy):
* giscanner/sourcescanner.h:
* giscanner/sourcescanner.py:
* giscanner/transformer.py:
* tests/scanner/foo-1.0-expected.gir:
* tests/scanner/foo-1.0-expected.tgir:
* tests/scanner/foo.h:
Large parts of this patch was done by Jürg Billeter.
svn path=/trunk/; revision=1025
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-01-12 Johan Dahlin <jdahlin@async.com.br>
Bug 563794 - Redo annotation parsing & applying
Thanks to Colin for helping out considerably in landing this.
* giscanner/Makefile.am:
* giscanner/ast.py:
* giscanner/dumper.py:
* giscanner/girparser.py:
* giscanner/giscannermodule.c (pygi_source_scanner_get_comments),
(calc_attrs_length), (pygi_collect_attributes), (init_giscanner):
* giscanner/glibtransformer.py:
* giscanner/scannerlexer.l:
* giscanner/sourcescanner.c (gi_source_symbol_unref),
(gi_source_scanner_new), (gi_source_scanner_free),
(gi_source_scanner_get_comments):
* giscanner/sourcescanner.h:
* giscanner/sourcescanner.py:
* giscanner/transformer.py:
* giscanner/xmlwriter.py:
* tests/scanner/annotation-1.0-expected.gir:
* tests/scanner/annotation-1.0-expected.tgir:
* tests/scanner/annotation.c:
* tests/scanner/annotation.h:
* tests/scanner/foo-1.0-expected.gir:
* tests/scanner/foo-1.0-expected.tgir:
* tests/scanner/foo.h:
* tools/g-ir-scanner:
This commit merges the annotation parser rewrite branch.
It'll change the annotation parsing to be done completely in python
code which will make it easier to do further annotation parsing
easier.
svn path=/trunk/; revision=1017
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-01-03 Andreas Rottmann <a.rottmann@gmx.at>
Bug 563469 – Arrays not treated correctly in struct offset calculation
* tests/scanner/foo.h (FooObject): Added field `some_int'.
* tests/scanner/foo-1.0-expected.gir,
* tests/scanner/foo-1.0-expected.tgir: Adapted.
* giscanner/glibtransformer.py (GLibTransformer._create_gobject):
carry over object fields from original (struct) node.
(GLibTransformer._pair_class_struct): Don't add fields of the
class struct to to the node for the class, they should go under a
nested <record> element (see also Bug 551738). This is needed as
otherwise offset calculation would not work, as the instance
fields are mingled with the class fields without a way to
distinguish them.
svn path=/trunk/; revision=1000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-11-25 Colin Walters <walters@verbum.org>
Bug 559705 – Missing association between static methods and classes
* docs/typelib-format.txt:
* girepository/ginfo.c (g_function_info_get_flags):
* girepository/girmodule.c (g_ir_module_build_typelib):
* girepository/girnode.c (g_ir_node_get_size),
(g_ir_node_build_typelib):
* girepository/girparser.c (start_function):
* girepository/gtypelib.c (g_typelib_check_sanity),
(validate_header), (validate_function_blob):
* girepository/gtypelib.h:
* giscanner/ast.py:
* giscanner/girwriter.py:
* giscanner/glibtransformer.py:
* tests/scanner/foo-1.0-expected.gir:
* tests/scanner/foo-1.0-expected.tgir:
* tests/scanner/foo.h:
svn path=/trunk/; revision=972
|
|
|
|
| |
svn path=/trunk/; revision=935
|
|
|
|
| |
svn path=/trunk/; revision=927
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-11-11 Tommi Komulainen <tommi.komulainen@iki.fi>
Based on patch by Johan Bilien.
* giscanner/transformer.py (_create_member, _create_parameter):
Resolve types here as well.
(_resolve_type_name_1): Try resolving using 'ctype' first since
it's least ambiguous. Fixes struct member type resolution with
similarly named types, e.g. Gdk.PangoRendererClass and
Pango.RendererClass
* tests/scanner/foo*: Add test.
svn path=/trunk/; revision=887
|