summaryrefslogtreecommitdiff
path: root/giscanner
AgeCommit message (Collapse)AuthorFilesLines
2010-09-20[maintransformer] Make warning more robustHEADmasterJohan Dahlin1-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
2010-09-20[message] Set file_positions to an empty listJohan Dahlin1-1/+1
So we can always pass it into len() without breaking https://bugzilla.gnome.org/show_bug.cgi?id=629959
2010-09-19Include proper line number for scope warningJohan Dahlin1-3/+4
2010-09-19[sourcescanner] Rewrite linemarks parserJohan Dahlin2-50/+25
Rewrite the pre-processor linemark parser so we end up with accurate filenames and linenumbers.
2010-09-19Include proper filename and lineno in doc warningJohan Dahlin1-1/+3
2010-09-19[annotationparser] Preserve line numbersJohan Dahlin2-18/+36
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
2010-09-19Save the line number of a source commentJohan Dahlin5-11/+40
2010-09-18[maintransformer] Do not warn for returns and varargsJohan Dahlin1-1/+1
Add a few more special case parameters which we will not warn if they don't exist as a parameter
2010-09-17Set c_symbol_prefix in the GVariant special caseTomeu Vizoso1-0/+1
2010-09-17Make Full the default transfer for returned foreign structs.Tomeu Vizoso1-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
2010-09-16[maintransformer] Do not warn for vararg docsJohan Dahlin1-0/+3
Allow varargs "..." to be documented without warning https://bugzilla.gnome.org/show_bug.cgi?id=629759
2010-09-15Add a warning for unresolved typesJohan Dahlin1-6/+15
Warn when using an annotation which will end up as unresolved. https://bugzilla.gnome.org/show_bug.cgi?id=629004
2010-09-15scanner: Add temporary workaround for GStreamerColin Walters3-0/+8
Also document/bug link the other workarounds; just made up a convention for ## WORKAROUND ## See: https://bugzilla.gnome.org/show_bug.cgi?id=550616
2010-09-14Add a parameter mismatch warningJohan Dahlin3-1/+28
https://bugzilla.gnome.org/show_bug.cgi?id=629708
2010-09-14scanner: Add c_type for callbacksColin Walters2-2/+3
We weren't doing this consistently, which broke nsname != cprefix cases. https://bugzilla.gnome.org/show_bug.cgi?id=629683
2010-09-14scanner: Parse annotations for typedefsColin Walters3-1/+10
* 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
2010-09-14scanner: Handle G_TYPE_HASH_TABLEColin Walters2-6/+12
Our Type creation from GType names didn't know how to handle the GObject boxeds for GHashTable, GArray etc.
2010-09-13scanner: Consistently use ctype for documentation blocksColin Walters1-11/+22
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".
2010-09-13scanner: Add GType for GVariantColin Walters1-5/+10
This needs a manual override since GVariant is a fundamental.
2010-09-13scanner: Bomb out more obviously if a namespace contains class name = namespaceColin Walters1-0/+6
If you pass --namespace=FooBar, and have a GObject named FooBar, we'd assert. Give the user an obvious error message.
2010-09-10scanner: Readd support for --strip-prefixColin Walters1-2/+3
We still really do want people to port to --identifier-prefix (and --symbol-prefix if necessary) because there's no ambiguity. Before the way we were casefolding was just a terrible mess.
2010-09-10scanner: Allow gstreamer's GParamSpecMiniObject throughColin Walters1-0/+13
It's wrong, but they can't change it now, so work around it here. https://bugzilla.gnome.org/show_bug.cgi?id=550616 https://bugzilla.gnome.org/show_bug.cgi?id=629306
2010-09-09scanner: Skip functions with leading '_'Colin Walters1-0/+3
Multiple modules have '_' prefixed symbols in "public" headers meaning "don't use this in your app".
2010-09-09scanner: Mark '_'-prefixed fields as introspectable=0Colin Walters1-0/+16
Typically these contain reserved callbacks; in any case we take a leading underscore to mean 'private'.
2010-09-09Foreign structs can have constructorsTomeu Vizoso1-2/+2
2010-09-09Use Node.ctype instead of Node.c_name when looking up comment blocksTomeu Vizoso1-1/+4
We were missing some annotation blocks for structs in typelibs with a name different to the C prefix.
2010-09-09scanner: Unify parsing of compoundsColin Walters1-38/+23
Avoids duplicate code.
2010-09-09scanner: Fix style for previous commitColin Walters1-3/+4
2010-09-09Print helpful error message if --strip-prefix option is used.Saikiran Madugula1-0/+7
2010-09-08scanner: Kill glibastColin Walters9-416/+355
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.
2010-09-08scanner: Don't mark as constructors things that are more obviously methodsColin Walters1-3/+10
If the first parameter matches the origin, don't scan as a constructor. Happened in practice with meta_screen_append_new_workspace from mutter.
2010-09-08scanner: Fix object hierarchy traversal in constructor scanningColin Walters1-2/+2
We weren't properly hitting GObject.
2010-09-08scanner: Don't attempt to pair methods/constructors with foreign namespacesColin Walters1-0/+4
See test case, hit in practice in gnome-shell.
2010-09-07Handle casing better for constantsOwen W. Taylor3-14/+12
Instead of handling constants by lower-casing them, stripping the lower-case prefix and upper-casing them again, leave them in the original case and check against upper-cased versions of namespace.symbol_prefixes. Wwe detect what version to test against by looking at the first character of the identifier, so we assume that --symbol-prefix options are always in lowercase. If that needs to be relaxed, then we'll have to check all symbols against both sets of prefixes. Add tests for constants to Regress.h and fix tests/warn/unresolved-type.h for a warning message that improved with this change. https://bugzilla.gnome.org/show_bug.cgi?id=629007
2010-09-07scanner: Automatically skip callables which contain a skipped nodeColin Walters1-0/+19
For legacy library author convenience, propagate (skip) on e.g. structures to all callables which use them.
2010-09-07Go back to previously handling of static methods on non-GObjectsOwen W. Taylor2-2/+10
Previous to the scanner rewrite, static methods were only handled for GObject subclasses. Go back to that for full compatibility with existing bindings and code. See bug 572408 for the topic of changing the API. The code for writing out static methods for records and boxed is left as future proofing, and the same handling is added for interfaces. https://bugzilla.gnome.org/show_bug.cgi?id=628967
2010-09-07scanner: Fall back to searching all includes when uncertainColin Walters1-1/+14
The scanner by default tries hard to ensure that we know immediately from seeing an identifier "FooBarBaz" that the namespace is "Foo". But libraries using --accept-unprefixed here screws this over. Potentially we could add --unstripped-identifier-prefix, but it's ugly. The best long term fix is to fix the namespacing in the library.
2010-09-07Revert "[scanner] Revert static method pairing"Johan Dahlin1-6/+3
This reverts commit 144cb10d51888a9565721088d2b61794468742e9.
2010-09-07[scanner] Make fatal warnings exitJohan Dahlin1-4/+6
Even if warnings are not enabled
2010-09-07[scanner] Fundamental problems are not fatalJohan Dahlin1-1/+2
2010-09-07scanner: Add various static debug hooks in GI_SCANNER_DEBUGColin Walters3-2/+28
For backwards compat, keep the presence of the environment variable at all to mean "exception". Also start a HACKING file.
2010-09-07[scanner] Make it compatible with Python 2.5 againJohan Dahlin1-0/+3
with statement is available in python 2.5, but only if you import it from __future__
2010-09-06Revert "Fix non-source-dir build failure"Johan Dahlin1-9/+0
This reverts commit 26c66df6bdc3e3ce836c7462958fa38cc3e1062f.
2010-09-06[scanner] Revert static method pairingJohan Dahlin1-3/+6
Static method pairing changes the API and should be futher discussed in https://bugzilla.gnome.org/show_bug.cgi?id=572408
2010-09-06[scanner] Clarify exception messageJohan Dahlin1-1/+1
2010-09-06Fix non-source-dir build failureTheppitak Karoonboonyanan1-0/+9
Make sure all giscanner python files are available in builddir, so the module is invokable during build time. https://bugzilla.gnome.org/show_bug.cgi?id=571591 Signed-off-by: Theppitak Karoonboonyanan <thep@linux.thai.net>
2010-09-06[scanner] Remove a bunch of unused functionsJohan Dahlin1-19/+0
2010-09-03scanner: Add backwards compatibility with some annotation typesColin Walters1-0/+6
These were listed on the wiki up until just now...
2010-09-03scanner: Don't clear out ctype on annotation strings if we fail to resolveColin Walters1-2/+3
We don't have an "annotation source" for Type right now; so as a quick hack, stuff it in the ctype but only if we fail to resolve.
2010-09-03scanner: Fix previous rename-to handling commitColin Walters1-4/+6