| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
This ensures that if the first argument of a function like
gboolean gdk_rgba_parse (GdkRGBA *rgba, const gchar *spec);
is annotated as being an out-arg, the result is a class function with two
arguments, not a method with one argument. Previously, the (out) annotation
was simply ignored.
https://bugzilla.gnome.org/show_bug.cgi?id=682124
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 764366f7e4ef5a765a24ffac8c60b811f38b9ad9.
It can't work right now because to really use the structures, you need
to register them as a boxed, and that means we also need to rename the
boxed type.
A future version of this patch will need to handle both the structure
name and the GType name.
https://bugzilla.gnome.org/show_bug.cgi?id=675985
|
|
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=675985
Moving the early annotation pass is needed to avoid
the first type resolve pass to resolve to the not-renamed type.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=679160
|
|
|
|
|
|
|
|
|
| |
Previous fix was wrong, as it called to_underscores_noprefix on a
prefixed type name. The actual fix is to call the transformer to
do the prefix / type_name split, and turn the latter to underscores.
Test case included.
https://bugzilla.gnome.org/show_bug.cgi?id=634202
|
|
|
|
|
|
| |
This is incorrect -- the type name that's passed to the function
should contain a prefix. This fixes error domains for GLib errors.
Don't revert doc changes or test additions.
|
|
|
|
|
|
|
|
|
|
| |
Turns out that the problem was not only in the wrong matching
to GType enums, but also that the non-GType heuristics used
to_underscores instead of to_underscores_noprefix, turning DBusError
into D_Bus_Error instead of DBus_Error.
Complete with various tests.
https://bugzilla.gnome.org/show_bug.cgi?id=669350
|
|
|
|
|
|
|
|
|
|
| |
_uscore_type_names maps from the c_symbol_prefix, which has the
global ns prefix removed, so we need to split the function symbol
before the lookup. Previously it worked because it used the heuristics
for unregistered enums (and failed for GDBusError, which has two
uppercase letters in succession)
https://bugzilla.gnome.org/show_bug.cgi?id=669350
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
This avoids tags overwriting parameters if they happen to
share the same name. For example, this was triggered by
valid code in libgnome-keyring.
tests/scanner/regress.c and tests/scanner/regress.h test
written by Colin Walters <walters@verbum.org>.
https://bugzilla.gnome.org/show_bug.cgi?id=672254
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=672254
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code which heuristically turned functions into class methods would always
ignore any function called *_get_type or *_get_gtype. However, the code which
looked for GI metadata functions to execute them was much more comprehensive,
checking not just the name, but also that it had no parameters and that it
returned a GType.
This change abstracts the more comprehensive check into the Function class, and
uses the same check in both places.
https://bugzilla.gnome.org/show_bug.cgi?id=671218
|
|
|
|
| |
Exclude the names we've already matched up from the "should be one of..." list
|
|
|
|
|
|
| |
Some vfuncs may not have public invokers. In these cases, annotations
may still be needed to correctly implement or chain up to a virtual
method from a subclass's implementation.
|
|
|
|
|
|
|
| |
Using < and > for delimiters is problematic because gtk-doc is Docbook
which in turn is SGML, and those are reserved characters.
https://bugzilla.gnome.org/show_bug.cgi?id=663190
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=657202
|
|
|
|
|
|
|
| |
6172c268 made the scanner think GObject* wasn't a superclass of its
subclasses. Fix that.
https://bugzilla.gnome.org/show_bug.cgi?id=661677
|
|
|
|
|
| |
Add an annotation tag "Value:" which can be used on
constants to override the value.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 81abc2eb63317003a11d1484e84698a37e8ec035 tries harder to keep
the c:type if it was overriden by a (type) annotation. However, the
_resolve() function was also called for (element-type), which had
undesirable effects - we'd copy the container c:type to the element
type.
Fix this by splitting out the c:type preservation to only happen when
processing toplevel types.
https://bugzilla.gnome.org/show_bug.cgi?id=656931
|
| |
|
|
|
|
|
| |
g-ir-scanner now warns for invalid (element-type) annotations
in GPtrArray and in GByteArray. Test that.
|
|
|
|
|
|
|
|
|
| |
Similarly to GPtrArrays, GByteArrays can only contain bytes. Emit
a warning if an inconsistent (element-type) is placed, and ensure
that the default is guint8 if nothing is added. This way bindings
can support GByteArrays without special casing them.
https://bugzilla.gnome.org/show_bug.cgi?id=652753
|
|
|
|
|
|
|
|
|
| |
It should be safe for bindings to assume that GPtrArrays hold only
pointers (or values as big as it), so there is no need to go through
hoops for converting smaller integers when marshalling.
Libraries that need arrays of integers should use GArray.
https://bugzilla.gnome.org/show_bug.cgi?id=652753
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This uses the same backcompat machinery that was introduced for static
methods for non-class types, so this change does not break users of the
existing presentations.
New libgirepository API:
g_enum_info_get_n_methods
g_enum_info_get_method
https://bugzilla.gnome.org/show_bug.cgi?id=656499
|
|
|
|
|
|
| |
Like gtk_list_store_newv and gtk_tree_store_newv.
https://bugzilla.gnome.org/show_bug.cgi?id=656460
|
|
|
|
|
| |
When we replace a type using annotation we should keep
the ctype of the original type.
|
|
|
|
|
|
|
| |
Use it to remove backcompat copies of functions that non introspectable
anyway.
https://bugzilla.gnome.org/show_bug.cgi?id=572408
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of storing the name of the function to call to get the
error quark, store the string form of the error quark, which
we derive from the introspection binary during scanning.
Update EnumBlob and GIEnumInfo to include the new information.
This will allow determining a back-mapping from error quark
to error domain without having to dlsym() and call all the
known error quark functions.
Based on earlier patches from Owen Taylor and Maxim Ermilov.
https://bugzilla.gnome.org/show_bug.cgi?id=602516
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=653484
|
|
|
|
|
|
|
|
|
|
|
| |
Change the special code for handling GObject and GInitiallyUnowned
so that it exposes GParamSpec as a class, and it allows GVariant to
have a GType without using the deprecate g_variant_get_gtype.
It is a sort of ABI break, in that new typelibs won't work with
previous versions of libgirepository.
https://bugzilla.gnome.org/show_bug.cgi?id=646635
|
|
|
|
|
|
|
|
|
|
|
|
| |
g-ir-compiler assumes that an array is zero terminated when the
attribute is absent and there is no other attribute (length and
fixed-size), but g-ir-scanner only added the attribute when it is 0.
This means that an explicit zero-terminated=1 annotation would have
had no effect.
Fix that and at the same time ensure that all other arrays are not
zero-terminated by default.
https://bugzilla.gnome.org/show_bug.cgi?id=646635
|
|
|
|
|
|
| |
Based on a patch by Giovanni Campagna <gcampagna@src.gnome.org>
https://bugzilla.gnome.org/show_bug.cgi?id=646635
|
|
|
|
|
|
|
|
| |
This was discussed in bug 649657.
https://bugzilla.gnome.org/show_bug.cgi?id=649657
Signed-off-by: David Zeuthen <davidz@redhat.com>
|
|
|
|
|
|
|
| |
This way fields are no longer limited to basic types, and can be
supported without accessor methods.
https://bugzilla.gnome.org/show_bug.cgi?id=646635
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=641347
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=641347
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
So the element type has the correct is_pointer flag
https://bugzilla.gnome.org/show_bug.cgi?id=638929
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Scanner tries to detect caller-allocates attribute automatically if
not explicitly specified by checking that parameter is not double-referenced
and is struct or union. This patch adds resolving of aliases when
checking whether parameter is struct or union.
Also removes old incorrect method transformer.follow_aliases, which
was never used in current code.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=639081
|
|
|
|
|
|
|
| |
* don't skip those associated to a signal
* don't warn if it doesn't have an invoker
https://bugzilla.gnome.org/show_bug.cgi?id=637215
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Inside an alias definition, we only need the name of the alias target
type. Add a method to GIRWriter to write out a type reference rather
than full type definition and use it when writing out an alias.
Determine introspectableness of aliases in IntrospectablePass so functions
using aliases can be marked not-introspectable if the alias itself is not.
https://bugzilla.gnome.org/show_bug.cgi?id=629682
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If present in annotation, use parameter names from annotation instead
of (object, p0, p1, ...) names generated by dumpparser.
Assign names for all parameters before trying to resolve annotation
types, so that annotations containing forward references to other
arguments, e.g.
* GApplication::open:
* @application: the application
* @files: (array length=n_files) (element-type GFile): an array of #GFiles
* @n_files: the length of @files
|
|
|
|
|
|
|
|
| |
These are the only things for which we expect native values to be
preserved; for e.g. flags and integers, we expect bindings to convert.
The particular rationale for this patch is to avoid flagging flags (sic)
as (out caller-allocates).
|
|
|
|
|
|
| |
The commit to use the c_symbol_prefix works in every case, except for
gdk_window_object_get_type(), which screws us. Fall back to the old
heuristic in this case.
|