| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
The goal here is to have one master library for testing lots of
edge cases for GIRs rather than lots of individual libraries.
https://bugzilla.gnome.org/show_bug.cgi?id=693097
|
|
|
|
|
|
|
|
|
|
| |
While there's no particular reason I need to do this, there
really isn't any reason to not do this, and it helps with doctool
or whatever in the future if we want to document when a constant
showed up. g-ir-compiler also keeps track of constant deprecations,
so this fixes constants not ever being deprecated.
https://bugzilla.gnome.org/show_bug.cgi?id=693040
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=657202
|
|
|
|
|
| |
Add an annotation tag "Value:" which can be used on
constants to override the value.
|
|
|
|
|
| |
When we replace a type using annotation we should keep
the ctype of the original type.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Modify the lexer to consider all "trigraph" comments specially, and
parse them for "flags" as well as "private" and "public" (which were
previously hardcoded). This change allows for future support of
multiple annotations inside a single trigraph comment.
- Change the parser to consider the additional field "flags" set by
the lexer when constructing enums.
- Add a test case for the "flags" trigraph comment to the scanner
annotation tests.
See <https://bugzilla.gnome.org/show_bug.cgi?id=631530>.
|
|
|
|
|
|
| |
Might as well be liberal here, as long as we have a test case.
https://bugzilla.gnome.org/show_bug.cgi?id=631690
|
|
|
|
| |
This reverts commit d15e386c8e10dd6b645a444e29cc053100089a07.
|
|
|
|
| |
Previously, such annotations would be ignored.
|
|
|
|
|
|
|
|
| |
The annotation parser changed to be stricter about annotation content,
but we introduced a regression where a : in the documentation would
wrongly cause the annotation to be skipped.
https://bugzilla.gnome.org/show_bug.cgi?id=630862
|
|
|
|
|
| |
Allow closures without annotations to avoid having
to duplicate the parameter name.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old parser tried to parse:
@foo: some text here (other text)
Reject this. We strictly require another colon at the end to parse
the text in between as (option) (other option).
Futher ensure we only attempt to do option parse if we find something
that matches the strict regexp ([A-Za-z]+). This could be tightened
further.
TODO: Have a warning for something that looks like an annotation,
but isn't.
https://bugzilla.gnome.org/show_bug.cgi?id=622659
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Add support for (element-type) annotations for G*Array
types.
https://bugzilla.gnome.org/show_bug.cgi?id=619545
|
|
|
|
|
|
|
| |
Annotation parser patch from: Tim Horton <hortont424@gmail.com>
If an explicit element type is specified, don't override it with
guint8.
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Add support for the 'Rename To:' annotation for functions and methods.
|
|
|
|
|
|
| |
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 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
| |
svn path=/trunk/; revision=1038
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-01-13 Johan Dahlin <jdahlin@async.com.br>
Bug 555036 – put gtk-doc in GIR
* giscanner/annotationparser.py:
* giscanner/ast.py:
* giscanner/girwriter.py:
* giscanner/glibast.py:
* tests/scanner/annotation-1.0-expected.gir:
* tests/scanner/annotation.h:
* tests/scanner/foo-1.0-expected.gir:
svn path=/trunk/; revision=1032
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-01-12 Johan Dahlin <jdahlin@async.com.br>
Bug 566419 – Element type of arrays not properly handled in all cases
* giscanner/annotationparser.py:
* tests/scanner/annotation-1.0-expected.gir:
* tests/scanner/annotation-1.0-expected.tgir:
* tests/scanner/annotation.c (annotation_object_set_data),
(annotation_object_set_data2), (annotation_object_set_data3):
* tests/scanner/annotation.h:
Based on patch by Andreas Rottmann
svn path=/trunk/; revision=1019
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-01-03 Andreas Rottmann <a.rottmann@gmx.at>
Bug 556489 – callback annotations
* giscanner/transformer.py
* tools/generate.c (write_callable_info): Write out the new scope,
closure and destroy attributes.
* giscanner/transformer.py (Transformer._type_is_callback): New
method, checking if a given type is a callback.
(Transformer._augment_callback_params): New method; adds
information (closure, destroy) to callback parameters.
(Transformer._handle_closure, Transformer._handle_destroy): New methods,
auxiliary to _augment_callback_params.
(Transformer._create_function): Call _augment_callback_params().
(Transformer._create_parameter): Handle scope option.
(Transformer._create_typedef_callback): New method, creates a
callback, and registers it in the typedef namespace
(Transformer._create_typedef): Use _create_typedef_callback()
instead of the plain _create_callback().
* giscanner/ast.py (Parameter): Added callback-related fields.
* giscanner/girwriter.py: Write out new Parameter fields.
* girepository/girnode.h (GIrNodeParam): Added fields scope,
closure and destroy.
* girepository/gtypelib.h (ArgBlob): Ditto.
* girepository/girparser.c (start_parameter): Handle new fields.
* girepository/girmodule.c (g_ir_module_build_typelib): Adjust
arg_blob_size, bump major version due to this change.
* girepository/girnode.c (g_ir_node_get_full_size_internal)
(g_ir_node_build_typelib)
* girepository/gtypelib.c (g_typelib_check_sanity): ArgBlob size
adjustments.
(g_ir_node_build_typelib): Fill in new ArgBlob flags from param.
* girepository/girepository.h (GIScope): New enumeration, listing
the different possible scopes for callbacks.
* girepository/ginfo.c (g_arg_info_get_scope)
(g_arg_info_get_closure, g_arg_info_get_destroy): Accessors for
callback-related argument indices (callback scope, closure for a
callback, destroy notification for a callback).
* tests/scanner/: Added testcases for new features.
svn path=/trunk/; revision=998
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we have a parameter annotated as (out), then having a ctype of
'char **' (or similar) doesn't necessarily indicate an array.
* giscanner/transformer.py: Skip array-detection logic for
(out)-annotated parameters.
* tests/scanner/annotation.h tests/scanner/annotation.c
tests/scanner/annotation-1.0-expected.gir
tests/scanner/annotation-1.0-expected.tgir: Add a test for
an (out) string parameter.
http://bugzilla.gnome.org/show_bug.cgi?id=563934
svn path=/trunk/; revision=994
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-12-08 Tristan Van Berkom <tristan.van.berkom@gmail.com>
Bug 563742 – introspection should record the introduced version of
symbols marked with the "Since:" tag
reviewed by: Johan
* giscanner/ast.py:
* giscanner/girwriter.py:
* giscanner/scannerlexer.l:
* giscanner/transformer.py:
* tests/scanner/annotation-1.0-expected.gir:
* tests/scanner/annotation-1.0-expected.tgir:
* tests/scanner/annotation.c (annotation_versioned):
* tests/scanner/annotation.h:
svn path=/trunk/; revision=988
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-11-21 Johan Dahlin <jdahlin@async.com.br>
Bug 561617 – Return value array annotations
* giscanner/transformer.py:
* tests/scanner/annotation.c (annotation_return_array):
* tests/scanner/annotation.h:
Add support for (array) for return value annotations as well.
svn path=/trunk/; revision=957
|
|
|
|
|
|
|
|
|
|
|
|
| |
* giscanner/glibtransformer.py (GLibTransformer.__init__): fix
spelling of GHashTable. #561135
* tests/scanner/annotation.c (annotation_object_get_hash):
* tests/scanner/annotation-1.0-expected.gir:
* tests/scanner/annotation-1.0-expected.tgir: add a test of
GHashTable annotations
svn path=/trunk/; revision=940
|
|
|
|
| |
svn path=/trunk/; revision=939
|
|
|
|
| |
svn path=/trunk/; revision=921
|
|
|
|
| |
svn path=/trunk/; revision=912
|
|
|
|
|
|
|
|
|
|
|
| |
2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
* giscanner/transformer.py (_create_callback): use annotations
for callbacks
* tests/scanner/annotation.h
* tests/scanner/annotation-1.0-expected.gir: add tests
svn path=/trunk/; revision=781
|
|
|
|
| |
svn path=/trunk/; revision=732
|
|
|
|
| |
svn path=/trunk/; revision=658
|
|
|
|
| |
svn path=/trunk/; revision=634
|
|
|
|
| |
svn path=/trunk/; revision=633
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* giscanner/ast.py: Add deprecation attributes.
* giscanner/girwriter.py: Write out deprecation data.
* girepository/girparser.c: Relax parsing; deprecated
attribute now includes freeform string.
* giscanner/scannerlexer.l: Parse Deprecated.
* giscanner/transformer.py: Look for deprecated attribute
on functions.
* tests/scanner/*: Add a Deprecated test.
svn path=/trunk/; revision=603
|
|
2008-08-20 Johan Dahlin <johan@gnome.org>
* tests/scanner/Makefile.am:
* tests/scanner/annotation-expected.gir:
* tests/scanner/annotation.c (annotation_object_class_init),
(annotation_object_init), (annotation_object_method),
(annotation_object_in), (annotation_object_out),
(annotation_object_inout), (annotation_object_inout2),
(annotation_object_inout3), (annotation_object_calleeowns),
(annotation_object_calleesowns), (annotation_object_get_strings),
(annotation_object_with_voidp), (annotation_object_get_objects),
(annotation_object_create_object), (annotation_object_allow_none):
* tests/scanner/annotation.h:
* tests/scanner/foo-expected.gir:
* tests/scanner/foo.c:
* tests/scanner/foo.h:
Split out annotation tests out of foo
svn path=/trunk/; revision=410
|