| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=657202
|
|
|
|
|
| |
Add an annotation tag "Value:" which can be used on
constants to override the value.
|
|
|
|
|
|
|
|
|
| |
If we're done parsing parameters, previously we would simply eat lines that looked like
@foo: blah blah
Example is in gtkcssprovider.c.
https://bugzilla.gnome.org/show_bug.cgi?id=656504
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we were eating any line form "* [A-Za-z]: " as a tag,
but this is a problem since e.g. gtk/gtk/gtkcssprovder.c had literal
CSS e.g. block: which erroneously matched.
Fix this by only accepting particular tags, similar to what gtk-doc
does (although we accept a superset, e.g. transfer too).
https://bugzilla.gnome.org/show_bug.cgi?id=656458
|
|
|
|
|
|
| |
For generating documentation, we actually want to preserve these.
https://bugzilla.gnome.org/show_bug.cgi?id=656389
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=655149
|
|
|
|
|
|
| |
So methods such as gtk_drag_dest_set() can be put inside Gtk.Widget
https://bugzilla.gnome.org/show_bug.cgi?id=639945
|
|
|
|
|
| |
Preserve the section names and write them out on the class/record/
interface.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=561264
|
|
|
|
|
|
| |
Might as well be liberal here, as long as we have a test case.
https://bugzilla.gnome.org/show_bug.cgi?id=631690
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
But disable the printing by default since it messes up
the generated file. And fix a couple of typos
|
| |
|
| |
|
|
|
|
|
| |
Allow closures without annotations to avoid having
to duplicate the parameter name.
|
| |
|
|
|
|
|
| |
All option annotations, which uses parenthesis are now
properly validated for number of values they expect
|
| |
|
| |
|
|
|
|
|
| |
Refactor and improve the warning messages for the transfer
warnings as well
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Don't parse annotations on lines such as:
'@param: This is a foo (eg, bar) else: x'
Where there's content between the last ) and the :.
|
|
|
|
|
|
| |
Warn for invalid annotations.
Change so that custom attributes have to use the annotation
keyword.
|
|
|
|
|
|
| |
Add a position class which will make it easier to
send filename/line/column information to the message
class.
|
|
|
|
|
|
|
|
| |
Make sure that the linenumbers of the documentation blocks
and tags are preserved and accurate so they can be used in
warning messages. Also:
* Rename Options to DocOptions for consistency
* Add a reference to the docblock a tag and an option belong to
|
| |
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=629708
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One of the first big changes in this rewrite is changing the Type
object to have separate target_fundamental and target_giname properties,
rather than just being strings. Previously in the scanner, it was
awful because we used heuristics around strings.
The ast.py is refactored so that not everything is a Node - that
was a rather useless abstraction. Now, only things which can have
a GIName are Node. E.g. Type and Field are no longer Node.
More things were merged from glibast.py into ast.py, since it isn't
a very useful split.
transformer.py gains more intelligence and will e.g. turn GLib.List
into a List() object earlier. The namespace processing is a lot
cleaner now; since we parse the included .girs, we know the C
prefix for each namespace, and have functions to parse both
C type names (GtkFooBar) and symbols gtk_foo_bar into their
symbols cleanly. Type resolution is much, much saner because
we know Type(target_giname=Gtk.Foo) maps to the namespace Gtk.
glibtransformer.py now just handles the XML processing from the dump,
and a few miscellaneous things.
The major heavy lifting now lives in primarytransformer.py, which
is a combination of most of annotationparser.py and half of
glibtransformer.py.
annotationparser.py now literally just parses annotations; it's
no longer in the business of e.g. guessing transfer too.
finaltransformer.py is a new file which does post-analysis for
"introspectability" mainly.
girparser.c is fixed for some introspectable=0 processing.
|
|
|
|
|
|
|
|
|
| |
Rather than have the scanner/parser handle both e.g. "glong" and
"long", simply use the GLib types everywhere.
This commit adds TYPE_LONG_LONG and TYPE_LONG_DOUBLE to the
scanner types; however, rather than add them to the typelib,
they're just marked as not-introspectable.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds support for instantiable fundamental object types,
which are not GObject based. This is mostly interesting for being
able to support GstMiniObject's which are extensivly used in GStreamer.
Includes a big test case to the Everything module (inspired by
GstMiniObject) which should be used by language bindings who wishes to
test this functionallity.
This patch increases the size of the typelib and breaks compatibility
with older typelibs.
https://bugzilla.gnome.org/show_bug.cgi?id=568913
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
| |
We typically expect people to annotate e.g. GList for virtuals
on the invoker, not on the virtual slot, since the invoker feels
like the public API.
https://bugzilla.gnome.org/show_bug.cgi?id=621570
|
|
|
|
|
|
|
|
|
|
|
|
| |
* girepository/*: Add g_property_info_get_ownership_transfer() and write
the transfer attribute of properties into the typelib.
* giscanner/*: Parse the (transfer) annotation and write it into the .gir.
* tools/generate.c: Read the transfer annotation for properties and write
to the .tgir.
https://bugzilla.gnome.org/show_bug.cgi?id=620484
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gir/gimarshallingtests.[hc]: Add a test for GStrv in function args and
as struct fields.
* girepository/giroffsets.c: Correctly compute the size of structs with
array fields
* girepository/girparser.c: Set is_pointer to FALSE for arrays with
fixed size that are inside structs.
* giscanner/glibtransformer.py: Special case GStrv as arrays of utf8.
* giscanner/annotationparser.py: Make full transfer the default for
arrays of char* returned by functions.
https://bugzilla.gnome.org/show_bug.cgi?id=620170
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add type annotation syntax for GObject properties. This makes
it possible to override the type of a property. For instance,
this will allow function pointers with a G_TYPE_POINTER type set
to be used from a language binding which reads the typelib information
in addition g_object_class_find_property.
https://bugzilla.gnome.org/show_bug.cgi?id=618318
|
|
|
|
|
|
|
| |
Add support for (element-type) annotations for G*Array
types.
https://bugzilla.gnome.org/show_bug.cgi?id=619545
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
People have wanted support for marking (out) on functions of the
form:
/**
* clutter_color_from_pixel:
* @pixel: A pixel
* @color: (out): Color to initialize with value of @pixel
*/
void
clutter_color_from_pixel (guint32 pixel, ClutterColor *color);
Where the caller is supposed to have allocated the argument; the
C function just initializes it. This patch adds support for this
argument passing style to introspection. In this case, we see the
(out), and notice that there's only a single indirection (*) on
the argument, and assume that this means (out caller-allocates).
https://bugzilla.gnome.org/show_bug.cgi?id=604749
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=619450
|
|
|
|
|
| |
The function name and parameter name were backwards when warning
about bad parameter references.
|
|
|
|
|
|
|
|
|
|
|
| |
When an annotation references another parameter, check that that
parameter actually exists.
Add a comment to the handling of (closure) for callbacks to explain
why we don't need the same handling there despite the use of
get_parameter_index().
https://bugzilla.gnome.org/show_bug.cgi?id=617978
|
|
|
|
|
|
|
| |
Make sure that the value specified for scope in a callback
annotation is one of the legal values.
https://bugzilla.gnome.org/show_bug.cgi?id=617978
|