summaryrefslogtreecommitdiff
path: root/giscanner/maintransformer.py
Commit message (Collapse)AuthorAgeFilesLines
* giscanner: mark GAsyncReadyCallbacks as allow-noneDan Winship2011-07-011-0/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=653484
* Rework how fundamental GObject types are introspectedGiovanni Campagna2011-06-081-3/+1
| | | | | | | | | | | 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
* Always add a zero-terminated attribute when it cannot be impliedGiovanni Campagna2011-06-041-0/+2
| | | | | | | | | | | | 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
* scanner: Support _get_gtype() as a GType creation suffixColin Walters2011-06-031-1/+3
| | | | | | Based on a patch by Giovanni Campagna <gcampagna@src.gnome.org> https://bugzilla.gnome.org/show_bug.cgi?id=646635
* Add support for the (skip) annotation on parameters or return valuesDavid Zeuthen2011-05-131-0/+3
| | | | | | | | This was discussed in bug 649657. https://bugzilla.gnome.org/show_bug.cgi?id=649657 Signed-off-by: David Zeuthen <davidz@redhat.com>
* giscanner: read (array) and (element-type) annotations for fieldsGiovanni Campagna2011-05-111-3/+7
| | | | | | | 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
* Add warnings for the (constructor) annotationTomeu Vizoso2011-02-221-11/+50
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=641347
* Add warnings for the (method) annotationTomeu Vizoso2011-02-221-4/+16
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=641347
* Add (method) overridesTomeu Vizoso2011-02-021-13/+33
| | | | | | So methods such as gtk_drag_dest_set() can be put inside Gtk.Widget https://bugzilla.gnome.org/show_bug.cgi?id=639945
* Preserve gtk-doc section namesJohan Dahlin2011-02-011-0/+5
| | | | | Preserve the section names and write them out on the class/record/ interface.
* Add (constructor) annotationTomeu Vizoso2011-01-281-11/+22
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=561264
* [scanner] Don't crash if we don't have a ctype in array element typesTomeu Vizoso2011-01-211-1/+2
|
* Preserve the c:type of array elementsTomeu Vizoso2011-01-211-2/+3
| | | | | | So the element type has the correct is_pointer flag https://bugzilla.gnome.org/show_bug.cgi?id=638929
* Disable missing class structure warning, add a bug referenceJohan Dahlin2011-01-201-2/+3
|
* Make caller-allocates detection work for struct aliasesPavel Holejsovsky2011-01-131-0/+1
| | | | | | | | | | | | 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
* scanner: Make sure that vfuncs made to the GIRTomeu Vizoso2011-01-071-13/+0
| | | | | | | * 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
* scanner: avoid crash when annotation explicitly changes 'self' argumentPavel Holejsovsky2010-12-211-1/+1
|
* scanner: support typedefs for container typesJonathan Matthew2010-12-161-10/+0
| | | | | | | | | | | 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
* giscanner: don't ignore signal parameter names from annotations.Pavel Holejsovsky2010-12-151-1/+4
| | | | | | | | | | | | | | 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
* scanner: Only mark structures and unions as out-caller-allocatesColin Walters2010-11-191-1/+4
| | | | | | | | 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).
* scanner: Fall back to default uscoring for method pairing if possibleColin Walters2010-11-161-6/+16
| | | | | | 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.
* scanner: use c-symbol-prefix for method pairing where possibleJonathan Matthew2010-11-161-1/+4
| | | | | | | | | If we have a C symbol prefix for the target type, then use that to identify methods that should be paired with it. The C symbol prefix is derived from the name of the _get_type() function, so it's likely that this is also the prefix given to methods for the type. https://bugzilla.gnome.org/show_bug.cgi?id=634153
* Revert "Apply `(type bitfield)' annotations for enums"Johan Dahlin2010-10-061-9/+2
| | | | This reverts commit d15e386c8e10dd6b645a444e29cc053100089a07.
* Revert "block can be None, fixup last commit"Johan Dahlin2010-10-061-4/+3
| | | | This reverts commit 754e5462f6dfbe3793eb959abf3dbfa7d2fe6435.
* block can be None, fixup last commitJohan Dahlin2010-10-051-3/+4
|
* Apply `(type bitfield)' annotations for enumsAndreas Rottmann2010-10-051-2/+9
| | | | Previously, such annotations would be ignored.
* scanner: Abort if we would be generating an empty namespaceColin Walters2010-09-291-0/+6
| | | | | | | | | Kind of silly we weren't doing this before; an empty namespace is always going to be unintentional. The "oops I forgot to include .h" files actually happened with Clutter, but it wasn't caught since the build didn't obviously fail.
* [annotationparser] Allow param less closuresJohan Dahlin2010-09-241-1/+1
| | | | | Allow closures without annotations to avoid having to duplicate the parameter name.
* Add more array warnings + testsJohan Dahlin2010-09-241-1/+5
|
* [maintransformer] Add more warnings for element-typeJohan Dahlin2010-09-241-5/+28
|
* [maintransformer] Use constantsJohan Dahlin2010-09-241-3/+3
|
* [annotation] Add constants for out optionsJohan Dahlin2010-09-241-2/+3
|
* [maintransformer] Use AssertionErrorJohan Dahlin2010-09-241-5/+2
|
* Add scope annotation value warningsJohan Dahlin2010-09-231-12/+3
| | | | | Refactor and improve the warning messages for the transfer warnings as well
* Validate transfer annnotationsJohan Dahlin2010-09-231-1/+1
|
* Paper-bag fix, add an OPT_TRANSFER importJohan Dahlin2010-09-231-1/+1
|
* Replace TAG_TRANSFER with OPT_TRANSFERJohan Dahlin2010-09-231-3/+3
|
* [scanner] Warn for invalid scanner annotationsJohan Dahlin2010-09-231-7/+7
| | | | | | Warn for invalid annotations. Change so that custom attributes have to use the annotation keyword.
* [maintransformer] Improve type resolution warningsJohan Dahlin2010-09-201-13/+36
| | | | | Try a bit harder to find the block where the type resolving errors originate from
* [scanner] Add a Position classJohan Dahlin2010-09-201-2/+2
| | | | | | Add a position class which will make it easier to send filename/line/column information to the message class.
* [maintransformer] Make warning more robustJohan Dahlin2010-09-201-2/+2
| | | | | | | Instead of assuming that a parent node is always passed in, make sure to handle that case. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629959
* Include proper line number for scope warningJohan Dahlin2010-09-191-3/+4
|
* Include proper filename and lineno in doc warningJohan Dahlin2010-09-191-1/+3
|
* [annotationparser] Preserve line numbersJohan Dahlin2010-09-191-1/+1
| | | | | | | | 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
* [maintransformer] Do not warn for returns and varargsJohan Dahlin2010-09-181-1/+1
| | | | | Add a few more special case parameters which we will not warn if they don't exist as a parameter
* Make Full the default transfer for returned foreign structs.Tomeu Vizoso2010-09-171-4/+16
| | | | | | | 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
* [maintransformer] Do not warn for vararg docsJohan Dahlin2010-09-161-0/+3
| | | | | | Allow varargs "..." to be documented without warning https://bugzilla.gnome.org/show_bug.cgi?id=629759
* Add a warning for unresolved typesJohan Dahlin2010-09-151-6/+15
| | | | | | | Warn when using an annotation which will end up as unresolved. https://bugzilla.gnome.org/show_bug.cgi?id=629004
* scanner: Add temporary workaround for GStreamerColin Walters2010-09-151-0/+2
| | | | | | | Also document/bug link the other workarounds; just made up a convention for ## WORKAROUND ## See: https://bugzilla.gnome.org/show_bug.cgi?id=550616
* Add a parameter mismatch warningJohan Dahlin2010-09-141-1/+24
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=629708