summaryrefslogtreecommitdiff
path: root/tests/scanner/foo.c
Commit message (Collapse)AuthorAgeFilesLines
* Use g_memdup2() with newer versions of GLibEmmanuele Bassi2021-03-121-0/+20
| | | | | The g_memdup() function has been deprecated, so we should use the new g_memdup2() function if available.
* Add the notion of standalone doc sections.Mathieu Duponchelle2020-07-121-0/+7
| | | | | | | | Up to now, section annotations had to match a class or interface name in order to be serialized in the gir. With this commit, they now get serialized as docsection nodes, for potential use by documentation tools.
* tests: Don't include "config.h" in installed filesPhilip Chimento2019-08-151-0/+3
| | | | | | These tests get installed, so config.h may not be available. Do the same thing that gimarshallingtests.c and regress.c already do, and include config.h conditionally.
* build: enable -Wredundant-declsChristoph Reiter2018-07-291-1/+0
| | | | | The ffi decls were added in cbdd9ee09e367e4dd to work around broken ffi headers. Let's assume this is fixed now.
* build: enable -Wcast-function-typeChristoph Reiter2018-07-291-2/+14
| | | | | | | | Where it's easy add dummy args to match the cast; where the target is a subset just prevent the warning with a cast to void*. Provide a real copy function for the boxed type code in regress_foo. This code is never executed afaics, but why not.
* tests/scanner: Decorate Symbols for ExportChun-wei Fan2014-08-151-0/+2
| | | | | | | | | | This updates the test headers and sources to decorate the symbols with the macro that can be used to export the symbols, and include config.h first in the c-sources so that the macro can be defined with the compiler directive to export the symbols. Update the CFLAGS as well so that the header that defines the export decoration macro can be found. https://bugzilla.gnome.org/show_bug.cgi?id=732669
* giscanner: deprecate GObject-Introspection GTK-Doc tagsDieter Verfaillie2013-10-081-3/+1
| | | | | | | | | | | | | | | | | | | | | After discussing a different issue with the GTK-Doc maintainers, we learned that our g-i specific top level tags should never have existed in the first place. The prefered notation for annotations that apply to the identifier should be written on the identifier line, for example like what we already do with (skip). As a result, this patch deprecates g-i specific top level tags and implements them as annotations on the identifier instead but still keeps support for malformed comment blocks using g-i specific top level tags. This means that all annotated code "out there" will continue to work just fine with this version of g-i, but when a developer decides to fix deprecation warnings in his/her comment blocks, the dependency on g-i needs to be raised to a version that contains at least this patch. #676133 https://bugzilla.gnome.org/show_bug.cgi?id=676133
* tests: Move do_moo to warnlibJasper St. Pierre2013-02-071-6/+0
| | | | | | | | We want to warn on unnamed params in declarations to ensure that all functions are bindable. Thus, we need to move a test containing unnamed params to WarnLib so it can be tested. https://bugzilla.gnome.org/show_bug.cgi?id=693098
* tests: Move Foo into RegressJasper St. Pierre2013-02-071-250/+248
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=693097
* scanner: allow for functions that look like constructors but aren'tDan Winship2012-05-261-0/+14
| | | | | | | | | | | | 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
* Fix malformed GTK-Doc comment blocks:Dieter Verfaillie2012-04-051-1/+1
| | | | | | | | | | | | | | | | | - add missing colons - invalid annotations - invalid parameters and tags - correct parameter name - preserve description indentation - no description parts - comment end marker - invalid empty lines - line numbers AnnotationParser now emits warnings which are considered as errors by "make check" so fix those warnings... https://bugzilla.gnome.org/show_bug.cgi?id=672254
* scanner: allow GObject.Object as a superclass return typeDan Winship2011-10-131-0/+12
| | | | | | | 6172c268 made the scanner think GObject* wasn't a superclass of its subclasses. Fix that. https://bugzilla.gnome.org/show_bug.cgi?id=661677
* scanner: handle static methods on all typesTorsten Schönfeld2011-08-131-0/+4
| | | | | | | | | | | | 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
* Move recently added (skip) tests to the regress moduleDavid Zeuthen2011-05-131-43/+0
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Add support for the (skip) annotation on parameters or return valuesDavid Zeuthen2011-05-131-0/+43
| | | | | | | | This was discussed in bug 649657. https://bugzilla.gnome.org/show_bug.cgi?id=649657 Signed-off-by: David Zeuthen <davidz@redhat.com>
* Make Full the default transfer for returned foreign structs.Tomeu Vizoso2010-09-171-0/+9
| | | | | | | 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
* Foreign structs can have constructorsTomeu Vizoso2010-09-091-0/+6
|
* scanner: Don't mark as constructors things that are more obviously methodsColin Walters2010-09-081-0/+37
| | | | | If the first parameter matches the origin, don't scan as a constructor. Happened in practice with meta_screen_append_new_workspace from mutter.
* scanner: Readd --warn-error to tests, fix test caseColin Walters2010-09-031-1/+10
| | | | | | | | | Commit b6fb70f9 wrongly disabled fatal warnings - in fact there is a way to make this test case work, and it was a bug in the scanner not processing virtual function annotations correctly. Add a different test case for un-named parameters that doesn't have a callback.
* [scanner] Allow nameless parameters for vfuncsJohan Dahlin2010-09-021-1/+11
| | | | | | | Add a test case and disable fatal warnings since there's currently no way to avoid the warning(s) Fixes https://bugzilla.gnome.org/show_bug.cgi?id=628567
* tests: Move FooSkippable to public headers to test comments in headersColin Walters2010-09-011-9/+0
|
* scanner: Don't parse constructors on non-registered, warn for return valuesColin Walters2010-09-011-0/+17
| | | | | | First, we can't support constructors on unregistered types. Second, warn if we see a return value of an unregistered.
* tests/scanner: Update annotations and testsColin Walters2010-08-311-1/+62
| | | | | | | | | | | | | First of all, add missing (transfer) annotations that will be required by the new scanner. Other changes: Don't use the (type bitfield) hack; the new scanner will not accept it. Use shifts in the flag constants instead. Use typedefs consistently for structures. Drop scanning of anonymous structure/union members.
* Add support for the 'foreign' annotation to g-i-scannerGOBJECT_INTROSPECTION_0_6_12Tomeu Vizoso2010-05-231-0/+5
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=619450
* Add support for GArrays: add g_type_info_get_array_type() and properly scan ↵Tomeu Vizoso2010-05-041-0/+10
| | | | | | | | GArray args Based on a previous patch by C. Scott Ananian <cscott@litl.com> https://bugzilla.gnome.org/show_bug.cgi?id=581687
* Revert "Add support for GArrays: add g_type_info_get_array_type() and ↵Tomeu Vizoso2010-05-031-10/+0
| | | | | | properly scan GArray args" This reverts commit 87291e08b0fd34b62e1ad9811c174108b38311a9.
* Add support for GArrays: add g_type_info_get_array_type() and properly scan ↵Tomeu Vizoso2010-04-301-0/+10
| | | | | | | | GArray args Based on a previous patch by C. Scott Ananian <cscott@litl.com> https://bugzilla.gnome.org/show_bug.cgi?id=581687
* Make (skip) annotation work everywhereDan Winship2009-11-231-0/+11
| | | | | | | | Previously it only worked for toplevel nodes. Now it works for any node except <field>, since skipping a field would cause the description of the struct layout to be wrong. https://bugzilla.gnome.org/show_bug.cgi?id=602652
* Bug 556628 – (skip) annotationDan Winship2009-08-241-0/+21
| | | | | Adds a (skip) option that can be added to the header of any doc comment to cause that symbol to be skipped in the .gir output
* Bug 565147 - Add (type) annotation to override the C type definitionColin Walters2009-03-161-0/+14
| | | | | | 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.
* Bug 557383 - Virtual method supportColin Walters2009-03-051-6/+47
| | | | | | | | | | | | | | | | Broadly speaking, this change adds the concept of <vfunc> to the .gir. The typelib already had most of the infrastructure for virtual functions, though there is one API addition. The scanner assumes that any class callback slot that doesn't match a signal name is a virtual. In the .gir, we write out *both* the <method> wrapper and a <vfunc>. If we can determine an association between them (based on the names matching, or a new Virtual: annotation), then we notate that in the .gir. The typelib gains an association from the vfunc to the function, if it exists. This will be useful for bindings since they already know how to consume FunctionInfo.
* Revert "Bug 557383 - Virtual function support"Colin Walters2009-02-261-5/+5
| | | | | | | This reverts commit 4470a24e8cf3827efaddcfe240c3271cf1a0d6c0. Needs more work as it turns out, we need to figure out the binding story.
* Bug 557383 - Virtual function supportColin Walters2009-02-261-5/+5
| | | | | | | In order to determine whether a method is virtual, by default we look at the class table to find a callback field. This should be fairly reliable, but we may also later need annotations to more finely control this in the case of a name clash with a signal.
* Bug 572790 - Don't register #defines from .c files as constantsColin Walters2009-02-241-2/+2
| | | | | We keep track of the source filename for every symbol. This enables us to later filter symbols based on that name.
* Fix warnings pointed out by GCCJohan Dahlin2009-02-201-1/+3
|
* Bug 561360 - If we can't resolve parent class, use GObjectColin Walters2009-02-051-2/+64
| | | | | | This enables us to support "hidden" parent classes. svn path=/trunk/; revision=1087
* Bug 561604 - Add test case for skipping va_listColin Walters2009-02-051-0/+5
| | | | svn path=/trunk/; revision=1086
* Bug 562622 – Errordomains missingJohan Dahlin2009-01-221-0/+22
| | | | | | | | | | | | | | | | | | 2009-01-21 Johan Dahlin <jdahlin@async.com.br> Bug 562622 – Errordomains missing * giscanner/girwriter.py: * giscanner/glibast.py: * giscanner/glibtransformer.py: * tests/scanner/Makefile.am: * tests/scanner/foo-1.0-expected.gir: * tests/scanner/foo-1.0-expected.tgir: * tests/scanner/foo.c (foo_error_get_type), (foo_error_quark): * tests/scanner/foo.h: svn path=/trunk/; revision=1057
* Add test for interface prereqColin Walters2008-11-171-0/+24
| | | | svn path=/trunk/; revision=935
* Reorganize and fix compiler warningsJohan Dahlin2008-11-111-37/+50
| | | | svn path=/trunk/; revision=880
* Always write out transfer-ownership attributeColin Walters2008-10-231-0/+11
| | | | svn path=/trunk/; revision=787
* Tests for bug 556777Colin Walters2008-10-201-1/+47
| | | | svn path=/trunk/; revision=764
* Bug 557011 - Add g_object_info_get_abstractColin Walters2008-10-201-1/+1
| | | | svn path=/trunk/; revision=757
* Bug 556795 - Fix char ** regressionColin Walters2008-10-181-0/+4
| | | | svn path=/trunk/; revision=750
* Bug 552374: Const strings should be identified in the gir.Jürg Billeter2008-10-111-0/+12
| | | | | | | | | | | | 2008-10-11 Jürg Billeter <j@bitron.ch> Bug 552374: Const strings should be identified in the gir. * giscanner/transformer.py: support string memory management * tests/scanner/foo.h: use char * and const char * * tests/scanner/foo-expected.gir: test that svn path=/trunk/; revision=670
* Bug 552370: unsigned not scanned properlyJürg Billeter2008-10-111-0/+5
| | | | | | | | | | | | | | 2008-10-11 Jürg Billeter <j@bitron.ch> Bug 552370: unsigned not scanned properly * giscanner/scannerparser.y: combine basic types such as unsigned int and long long when scanning * tests/scanner/foo-expected.gir: * tests/scanner/foo.c: (foo_test_unsigned): * tests/scanner/foo.h: test that svn path=/trunk/; revision=666
* Extend coverage of boxed struct/union test casesColin Walters2008-10-031-0/+24
| | | | svn path=/trunk/; revision=656
* Merge branch 'bug552393-varargs'Colin Walters2008-10-021-0/+6
| | | | svn path=/trunk/; revision=643
* Merge branch 'bug552566-timet/wip'Colin Walters2008-09-231-0/+5
| | | | svn path=/trunk/; revision=624
* Bug 552390: Handle capitialization like "DBus" more robustlyColin Walters2008-09-201-0/+30
| | | | | | | | The to_underscores function was designed for use against prefixed names; we need a separate function which will convert names like DBusFoo into dbus_foo, not d_bus_foo. svn path=/trunk/; revision=621