summaryrefslogtreecommitdiff
path: root/giscanner/introspectablepass.py
Commit message (Collapse)AuthorAgeFilesLines
* tests: Update misc/pep8.py to 1.4.5Dieter Verfaillie2013-05-071-20/+24
| | | | | | | | | | | | | | | | | Version in our tree is a wee bit outdated. For example, later work will introduce an utf8 encoded python source file which our old pep8.py does not yet understand (yeah, it really was *that* ancient)... Updated from: https://raw.github.com/jcrocholl/pep8/1.4.5/pep8.py Takes 552c1f1525e37a30376790151c1ba437776682c5, f941537d1c0a40f0906490ed160db6c79af572d3, 5a4afe2a77d0ff7d9fea13dd93c3304a6ca993de and a17f157e19bd6792c00321c8020dca5e5a281f45 into account... https://bugzilla.gnome.org/show_bug.cgi?id=699535
* annotationparser: Remove get_tag/get_paramJasper St. Pierre2013-05-071-1/+1
| | | | | | They're useless if we can just access the dict directly. https://bugzilla.gnome.org/show_bug.cgi?id=688897
* scanner: remove backcompat copies more safelyTorsten Schönfeld2013-02-101-4/+4
| | | | | | | | Instead of modifying the namespace while we are iterating over it, which leads to nodes not being tested, set an 'internal_skipped' property on the function and read it in the GIR writer. https://bugzilla.gnome.org/show_bug.cgi?id=660698
* scanner: Warn if we're missing (element-type) for GPtrArrayColin Walters2012-12-101-1/+1
| | | | | | | | | | For background, See https://bugzilla.gnome.org/show_bug.cgi?id=629682 See https://bugzilla.gnome.org/show_bug.cgi?id=689871 Basically we should emit a warning here. https://bugzilla.gnome.org/show_bug.cgi?id=689998
* Split parameter and tag storage in annotationparser parse treeDieter Verfaillie2012-04-051-1/+1
| | | | | | | | | | | 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
* Skip analysis of params that have been (skip)'dStef Walter2011-09-281-0/+3
| | | | | | Otherwise we get warnings for params that have been skipped https://bugzilla.gnome.org/show_bug.cgi?id=660352
* Fix warning for missing (element-type)Colin Walters2011-08-291-2/+2
| | | | | | While looking for a different bug, I noticed that the introspectable pass lists was missing GSList. And the warning was never set up to fire anyways. Fix it and add a test.
* scanner: add a moved_to property to backcompat functionsTorsten Schönfeld2011-08-131-0/+10
| | | | | | | Use it to remove backcompat copies of functions that non introspectable anyway. https://bugzilla.gnome.org/show_bug.cgi?id=572408
* scanner: Make sure that vfuncs made to the GIRTomeu Vizoso2011-01-071-10/+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: support typedefs for container typesJonathan Matthew2010-12-161-0/+7
| | | | | | | | | | | 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
* Add support for gunichar in typelibColin Walters2010-11-121-4/+0
| | | | | | | 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
* Use tag position if availableJohan Dahlin2010-09-241-0/+6
|
* [IntrospectablePass] Suppress callback/vfunction warningsJohan Dahlin2010-09-201-0/+5
| | | | | Suppress a callback and virtual function warnings until there's a clear way to document them.
* [IntrospectablePass] Improve error messageJohan Dahlin2010-09-201-2/+6
| | | | | Send in block postions so we can get accurate line numbers for warnings emitted from this class.
* Pass in blocks to IntrospectablePassJohan Dahlin2010-09-201-1/+2
|
* scanner: Kill glibastColin Walters2010-09-081-4/+3
| | | | | | | | | | | | 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.
* scanner: Automatically skip callables which contain a skipped nodeColin Walters2010-09-071-0/+19
| | | | | For legacy library author convenience, propagate (skip) on e.g. structures to all callables which use them.
* [scanner] Move over remaining callsites to messageJohan Dahlin2010-09-021-2/+3
| | | | | Move the remaining callsites over to the new message module
* scanner: Better handling of GType namesColin Walters2010-09-011-1/+4
| | | | | | | | Before, Type instances could be indeterminate, holding a "ctype", which means "This is some unresolved string". However, we also get data from GType, so add gtype_name as another indeterminate state. Clean up how we create and resolve Type instances from GType data.
* scanner: Skipped nodes aren't introspectable eitherColin Walters2010-09-011-1/+1
|
* scanner: Don't parse constructors on non-registered, warn for return valuesColin Walters2010-09-011-13/+44
| | | | | | First, we can't support constructors on unregistered types. Second, warn if we see a return value of an unregistered.
* scanner: Filter interface prerequisites and class implements for unknown typesColin Walters2010-08-311-0/+2
| | | | This works around the hidden GtkFileChooserEmbed interface of GtkFileChooserWidget.
* Major rewriteColin Walters2010-08-311-0/+159
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.