summaryrefslogtreecommitdiff
path: root/tests/scanner
Commit message (Collapse)AuthorAgeFilesLines
* Add warnings for the (constructor) annotationTomeu Vizoso2011-02-223-0/+16
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=641347
* Include cairo.h instead of cairo/cairo.hSimon van der Linden2011-02-111-1/+1
| | | | The cairo/ directory is searched for header files anyway.
* Add (method) overridesTomeu Vizoso2011-02-023-0/+16
| | | | | | 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/+1
| | | | | Preserve the section names and write them out on the class/record/ interface.
* Add (constructor) annotationTomeu Vizoso2011-01-283-0/+22
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=561264
* Preserve the c:type of array elementsTomeu Vizoso2011-01-213-26/+26
| | | | | | So the element type has the correct is_pointer flag https://bugzilla.gnome.org/show_bug.cgi?id=638929
* Make caller-allocates detection work for struct aliasesPavel Holejsovsky2011-01-133-0/+37
| | | | | | | | | | | | 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
* Add support for g[u]intptr in scanner and girwriter.Pavel Holejsovsky2011-01-133-8/+8
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=634838
* tests: Update expected girs for --c-includeColin Walters2011-01-114-0/+4
|
* tests: Fix build by including correct headers with --c-includeBenjamin Otte2011-01-111-1/+5
|
* scanner: Make sure that vfuncs made to the GIRTomeu Vizoso2011-01-071-0/+5
| | | | | | | * 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-213-0/+15
|
* make check pass for recent commitsColin Walters2010-12-171-4/+4
| | | | | * Fix use of tabs * Update for correct signal parameters
* scanner: support typedefs for container typesJonathan Matthew2010-12-163-0/+67
| | | | | | | | | | | 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-3/+3
| | | | | | | | | | | | | | 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
* Fix thinko in regress suite.Pavel Holejsovsky2010-12-081-1/+1
| | | | | | | | | regress_test_fundamental_sub_object_finalize should call parent's regress_test_fundamental_object_finalize instead of regress_test_fundamental_object_unref, otherwise recursion and double-free might happen. https://bugzilla.gnome.org/show_bug.cgi?id=636620
* Support glib-mkenums comment /*< flags >*/Andreas Rottmann2010-12-072-0/+10
| | | | | | | | | | | | | | | - 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>.
* Support hexadecimal escapes in constantsColin Walters2010-12-022-0/+5
| | | | | | | g_strcompress() only does some of what we need; fork it and add support for \x escapes too. https://bugzilla.gnome.org/show_bug.cgi?id=595773
* scanner: Only mark structures and unions as out-caller-allocatesColin Walters2010-11-193-0/+28
| | | | | | | | 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: use c-symbol-prefix for method pairing where possibleJonathan Matthew2010-11-161-31/+23
| | | | | | | | | 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
* Add support for gunichar in typelibColin Walters2010-11-123-0/+16
| | | | | | | Some API such as gtk_text_iter_get_char returns an individual "gunichar"; we should support this. https://bugzilla.gnome.org/show_bug.cgi?id=633197
* Switch to nonrecursive make for core (i.e. not tests/)Colin Walters2010-11-091-3/+3
| | | | | This is cleaner and faster, and prepares us better for an incoming import of CMPH.
* Handle enumerations with the full range of signed and unsigned valuesOwen W. Taylor2010-11-013-2/+64
| | | | | | | | | | | | | The C compiler will pick an enumeration type that accomodates the specified values for the enumeration, so ignoring 64-bit enumerations, we can have enumeration values from MININT32 to MAXUINT32. To handle this properly: - Use gint64 for holding eumeration values when scanning - Add a 'unsigned_value' bit to ValueBlob so we can distinguish the int32 vs. uint32 cases in the typelib - Change the return value of g_value_info_get_value() to gint64. https://bugzilla.gnome.org/show_bug.cgi?id=629704
* scanner: Support GStrv as signal parametersColin Walters2010-10-212-0/+34
|
* Accept trailing whitespace at the start of a comment blockColin Walters2010-10-193-0/+21
| | | | | | Might as well be liberal here, as long as we have a test case. https://bugzilla.gnome.org/show_bug.cgi?id=631690
* Revert "Apply `(type bitfield)' annotations for enums"Johan Dahlin2010-10-062-13/+0
| | | | This reverts commit d15e386c8e10dd6b645a444e29cc053100089a07.
* Apply `(type bitfield)' annotations for enumsAndreas Rottmann2010-10-052-0/+13
| | | | Previously, such annotations would be ignored.
* Fix testsColin Walters2010-09-292-2/+10
|
* annotationparser: Don't ignore annotations if there's a : in docsGOBJECT_INTROSPECTION_0_9_8Colin Walters2010-09-282-0/+16
| | | | | | | | 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
* Modify Regress impl so that inout args ignore (transfer) for 'in' direction.GOBJECT_INTROSPECTION_0_9_7Pavel Holejsovsky2010-09-281-9/+9
| | | | | | ... because for 'in' arguments only (transfer none) is correct. https://bugzilla.gnome.org/show_bug.cgi?id=630788
* Remove Regress tests with input args with transfer full or container.Pavel Holejsovsky2010-09-283-260/+0
| | | | | | | Declaring input parameters with transfer other than none is discouraged, so don't do it in the testsuite. https://bugzilla.gnome.org/show_bug.cgi?id=630788
* regress: Remove busted testsColin Walters2010-09-273-64/+0
| | | | | We don't want people making functions which take ownership of arguments, so don't do it in the test suite.
* [scanner] Make sure private enums are filteredJohan Dahlin2010-09-261-2/+2
| | | | This is a follow-up to 60a8c75 which wasn't properly fixed.
* [annotationparser] Allow param less closuresJohan Dahlin2010-09-241-1/+1
| | | | | Allow closures without annotations to avoid having to duplicate the parameter name.
* Fix a couple of broken annotationsJohan Dahlin2010-09-242-2/+2
|
* [scanner] Warn for invalid scanner annotationsJohan Dahlin2010-09-232-7/+7
| | | | | | Warn for invalid annotations. Change so that custom attributes have to use the annotation keyword.
* [scanner] Support private/public directivesJohan Dahlin2010-09-202-0/+37
| | | | Fixes https://bugzilla.gnome.org/show_bug.cgi?id=594125
* Make Full the default transfer for returned foreign structs.Tomeu Vizoso2010-09-173-0/+15
| | | | | | | 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
* scanner: Add c_type for callbacksColin Walters2010-09-142-0/+26
| | | | | | | We weren't doing this consistently, which broke nsname != cprefix cases. https://bugzilla.gnome.org/show_bug.cgi?id=629683
* tests: Don't build regress if we don't HAVE_CAIROColin Walters2010-09-141-1/+6
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=629359
* scanner: Parse annotations for typedefsColin Walters2010-09-142-0/+23
| | | | | | | | * Explicitly check for ast.Alias in annotation pass * Add "generic" attribs handling for aliases like docs, introspectable=0 etc. https://bugzilla.gnome.org/show_bug.cgi?id=629668
* scanner: Handle G_TYPE_HASH_TABLEColin Walters2010-09-142-0/+36
| | | | | Our Type creation from GType names didn't know how to handle the GObject boxeds for GHashTable, GArray etc.
* scanner: Consistently use ctype for documentation blocksColin Walters2010-09-131-1/+1
| | | | | | | | The "c_name" is really a fallback; use "ctype" if available which matches the C structure name. This fixes scanning at least TelepathyGLib where the namespace is different from the C prefix "Tp".
* scanner: Add a test for G_TYPE_ARRAY and (element-type uint)Colin Walters2010-09-132-0/+41
| | | | Similar to TelepathyGlib.
* Do not use install-data-localJohan Dahlin2010-09-131-4/+2
| | | | Instead use xxxdir + xxx_DATA which uninstalls correctly
* build: Also use $DESTDIR for regress.[ch]Colin Walters2010-09-101-1/+1
|
* scanner: Skip functions with leading '_'Colin Walters2010-09-091-0/+2
| | | | | Multiple modules have '_' prefixed symbols in "public" headers meaning "don't use this in your app".
* scanner: Mark '_'-prefixed fields as introspectable=0Colin Walters2010-09-092-0/+18
| | | | | Typically these contain reserved callbacks; in any case we take a leading underscore to mean 'private'.
* Foreign structs can have constructorsTomeu Vizoso2010-09-093-0/+13
|
* scanner: Kill glibastColin Walters2010-09-081-0/+2
| | | | | | | | | | | | It was a stupid abstraction split, we only support GObject. * Clean up how we handle c:type - we only set it if we've actually seen a corresponding structure. * Add a warning if we don't see the structure typedef for an interface, since that's pretty bogus. (And fix regress.h to have one) * Rename the "type_name" attribute internally to "gtype_name" for clarity.