summaryrefslogtreecommitdiff
path: root/giscanner
Commit message (Collapse)AuthorAgeFilesLines
* scanner: support stability tagEvan Nemerson2012-07-103-1/+14
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=679160
* scanner: Ensure "complete_ctype" patch doesn't throw an exception for ↵Colin Walters2012-07-081-0/+2
| | | | | | | | anonymous unions The previous patch introduced a regression where we would crash on encountering an anonymous union. Work around this by just writing out 'gpointer' in this case, and add a regression test.
* giscanner: Write detailed information in "type" tag's "c:type" attribute.Krzesimir Nowak2012-07-073-17/+75
| | | | | | | | That is - write also type qualifiers (const and volatile here). Update existing tests and add a new struct to regress.h having members with type qualifiers. https://bugzilla.gnome.org/show_bug.cgi?id=656445
* scanner: Turn dead code into assertionColin Walters2012-07-061-2/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=656445
* giscanner: Fix pointer parsing.Krzesimir Nowak2012-07-061-3/+15
| | | | | | | | | | | | They were parsed in wrong order resulting in having wrong pointer being const. For example - g_settings_list_schemas return type is normally 'const gchar *const *', but parsing result was 'const gchar ** const'. This was unnoticed, because pointer constness information is rather not used by gobject-introspection now. https://bugzilla.gnome.org/show_bug.cgi?id=656445
* Maintransfomer: fix again paring error domains with unregistered enumsGiovanni Campagna2012-07-021-13/+3
| | | | | | | | | Previous fix was wrong, as it called to_underscores_noprefix on a prefixed type name. The actual fix is to call the transformer to do the prefix / type_name split, and turn the latter to underscores. Test case included. https://bugzilla.gnome.org/show_bug.cgi?id=634202
* scanner: Remove propertiesJasper St. Pierre2012-06-281-40/+24
| | | | We don't need a basic getter for a private field - this isn't Java.
* scanner: Don't use an O(N) lookup when we already have a hashmapJasper St. Pierre2012-06-282-7/+5
| | | | This is a general code cleanup.
* Revert scanner fix in 64f3832Jasper St. Pierre2012-06-271-1/+1
| | | | | | This is incorrect -- the type name that's passed to the function should contain a prefix. This fixes error domains for GLib errors. Don't revert doc changes or test additions.
* scanner: complete the enum-to-error-quark fixGiovanni Campagna2012-06-182-2/+5
| | | | | | | | | | Turns out that the problem was not only in the wrong matching to GType enums, but also that the non-GType heuristics used to_underscores instead of to_underscores_noprefix, turning DBusError into D_Bus_Error instead of DBus_Error. Complete with various tests. https://bugzilla.gnome.org/show_bug.cgi?id=669350
* scanner: fix pairing of error quarks with registered enumsGiovanni Campagna2012-06-161-3/+5
| | | | | | | | | | _uscore_type_names maps from the c_symbol_prefix, which has the global ns prefix removed, so we need to split the function symbol before the lookup. Previously it worked because it used the heuristics for unregistered enums (and failed for GDBusError, which has two uppercase letters in succession) https://bugzilla.gnome.org/show_bug.cgi?id=669350
* scanner: allow for functions that look like constructors but aren'tDan Winship2012-05-261-3/+4
| | | | | | | | | | | | 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
* Add the fixed width C99 types from stdint.hNeil Roberts2012-05-021-0/+9
| | | | | | | | | | | | | C99 has standard types for fixed width signed and unsigned integers. This adds types to giscanner to map them to the glib equivalent types. stdint.h also has other types to specify specify sizes with at least a certain number of bits, the fastest type with at least some number of bits, a type big enough to store a pointer and a type containing the most number of bits. These don't map well to glib types so I have ignored them. https://bugzilla.gnome.org/show_bug.cgi?id=674796
* annotationparser: cleanup and add tests for the new warnings we now emitDieter Verfaillie2012-04-172-31/+22
| | | | | | | | | Including: - handle things in the logical order encountered (first colon, then annotations) - correctly report column when missing a colon on the identifier part - small type fixes - remove no longer useful "parameter/tag expected" warnings
* Revert "annotationparser: indent _parse_comment_block gtkdoc code"Dieter Verfaillie2012-04-171-95/+95
| | | | | | | | | This reverts commit f41525d54f53edd9b0d665397f7c6c755ee3616b and adds a more complete solution as the original commit only handled empty lines between the GTK-Doc comment block start token "/**" and the identifier. https://bugzilla.gnome.org/show_bug.cgi?id=673806
* annotationparser: indent _parse_comment_block gtkdoc codeAlban Browaeys2012-04-171-89/+90
| | | | | | | | | | | | | | | | | | | | The current logic in _parse_comment_block of the annotationparser check the identifier and use variables that only makes sense if a result was returned (column_offset, original_line). This patch indent the logic so it is only triggered if a result is found. Otherwise it returns None as expected by call chain "parse > parse_comment_block > _parse_comment_block": ie in "parse": comment_block = self.parse_comment_block(comment) if comment_block is not None: This still raises a lot of warnings but does not abort while generating gir for libgnomekbd, mutter or telepathy-glib (those thus have to be tweaked not to call g-ir-scanner with --warn-error at least until the parser mask those false positives or the doc from those projects is fixed to comply with the behaviour expected by giscanner). https://bugzilla.gnome.org/show_bug.cgi?id=673806
* Don't link with gthread-2.0Kalev Lember2012-04-131-1/+1
| | | | | | | Commit 2fff986 removed the use of g_thread_init() and we don't use any other symbols from gthread-2.0. https://bugzilla.gnome.org/show_bug.cgi?id=674065
* Compare filenames using g_file_equal()Johan Dahlin2012-04-092-1/+15
| | | | | | Makes it work on case-sensitive file systems such as HFS+. https://bugzilla.gnome.org/show_bug.cgi?id=667405
* Pass in LDFLAGS to the dumperJohan Dahlin2012-04-091-8/+9
| | | | | | | | We should honor LDFLAGS environment variable set by the user, so options such as -Wl,--enable-new-dtags properly get passed to the linker when creating the dumper binary https://bugzilla.gnome.org/show_bug.cgi?id=670152
* annotationparser: split validate() into sub-methodsWill Thompson2012-04-091-58/+67
| | | | | | | | Most cases in validate() were already simply calls to _validate_option() with particular arguments; this extracts the code from the remaining options to their own methods, making the dispatch table more legible. https://bugzilla.gnome.org/show_bug.cgi?id=670985
* annotationparser: correct "maximium" in error messagesWill Thompson2012-04-091-3/+3
| | | | | | | | "Maximium" is not an English word. Even if corrected to "maximum" (which is), "at maximum" is not conventional usage: "at most" is more idiomatic. https://bugzilla.gnome.org/show_bug.cgi?id=670985
* annotationparser: remove duplication of annotation namesWill Thompson2012-04-091-13/+13
| | | | | | | | | | Previously, the validation code compared each option name to a constant (such as OPT_ALLOW_NONE) which expands to the string used in a source file, and if they matched it would typically pass that same string to _validate_option(). But the annotation name was written out longhand each time, which seemed strange to me. https://bugzilla.gnome.org/show_bug.cgi?id=670985
* giscanner: Don't run pkg-config when there's no packages specifiedJasper St. Pierre2012-04-091-3/+4
| | | | | | | This prevents a simple error from pkg-config, "Must specify package names on command line" https://bugzilla.gnome.org/show_bug.cgi?id=673668
* Split parameter and tag storage in annotationparser parse treeDieter Verfaillie2012-04-053-45/+53
| | | | | | | | | | | 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
* Do the filename filtering in scannerlexerJohan Dahlin2012-04-052-8/+18
| | | | | This avoids a bit of python work and reduces the amount of allocations.
* Don't parse doc comments in dependenciesJohan Dahlin2012-04-052-2/+8
| | | | | Only parse doc comments for the files we pass in on the command line to g-ir-scanner, not the included dependencies.
* Replace ''' with """, to avoid confusing syntax highlightning in emacsJohan Dahlin2012-04-051-8/+8
|
* Now make AnnotationParser do what gobject-introspection needs it to do.Dieter Verfaillie2012-04-055-228/+1262
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=672254
* Make AnnotationParser._parse_comment() do what gtk-doc does.Dieter Verfaillie2012-04-051-169/+226
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=672254
* Don't munch /* and */ comment start and end markers.Dieter Verfaillie2012-04-051-2/+2
| | | | | | | | | | | In Sandro Sigala's original c-c++-grammars code, this function was known as "static void skip_comment(void)". It was built this way instead of a lex pattern because it didn't need to save the matched comment in the "yytext" buffer. This is still true as we directly assign the matched comment to the scanner object. So simply prepend and append the markers back where they belong. https://bugzilla.gnome.org/show_bug.cgi?id=672254
* Add comment documenting we're ignoring C++ style comments.Dieter Verfaillie2012-04-051-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=672254
* g-ir-doc-tool: Fix -o option, use abspath instead of dirnameTomeu Vizoso2012-03-151-1/+1
|
* scanner: Remove array fields from List.clone()Jesse van den Kieboom2012-03-151-5/+1
| | | | | | These were apparently copied by mistake. https://bugzilla.gnome.org/show_bug.cgi?id=667701
* Fix matching of methods named *_get_type()Matthew Booth2012-03-063-14/+30
| | | | | | | | | | | | | The code which heuristically turned functions into class methods would always ignore any function called *_get_type or *_get_gtype. However, the code which looked for GI metadata functions to execute them was much more comprehensive, checking not just the name, but also that it had no parameters and that it returned a GType. This change abstracts the more comprehensive check into the Function class, and uses the same check in both places. https://bugzilla.gnome.org/show_bug.cgi?id=671218
* g-ir-doc-tool: Remove class structs from Python docsTomeu Vizoso2012-02-211-0/+4
|
* g-ir-doc-tool: Add support for virtual functionsTomeu Vizoso2012-02-214-0/+97
|
* g-ir-doc-tool: Remove constructors from python docsTomeu Vizoso2012-02-211-1/+2
|
* g-ir-doc-tool: Add class to its own hierarchy treeTomeu Vizoso2012-02-211-1/+1
|
* g-ir-doc-tool: Add the first argument of signals to the Python docsTomeu Vizoso2012-02-211-3/+5
|
* g-ir-doc-tool: Add missing file: giscanner/mallard-C-enum.tmplTomeu Vizoso2012-02-201-0/+12
|
* g-ir-doc-tool: Change the -o option to receive a directoryTomeu Vizoso2012-02-201-1/+3
|
* Merge branch 'mallard-templates'Tomeu Vizoso2012-02-2021-1234/+700
|\
| * g-ir-doc-tool: Add some more stuff to Enum pagesTomeu Vizoso2012-02-202-0/+26
| |
| * g-ir-doc-tool: Display the hierarchy tree for classesTomeu Vizoso2012-02-202-32/+35
| |
| * g-ir-doc-tool: Install the Mako template filesTomeu Vizoso2012-02-201-1/+1
| |
| * g-ir-doc-tool: Remove stale DocBook filesTomeu Vizoso2012-02-202-754/+0
| |
| * g-ir-doc-tool: Properly link to property pagesTomeu Vizoso2012-02-201-0/+11
| |
| * g-ir-doc-tool: Fix names of xref linksTomeu Vizoso2012-02-201-1/+5
| |
| * g-ir-doc-tool: Move constructor example to follow the class doc bodyTomeu Vizoso2012-02-201-12/+15
| |
| * g-ir-doc-tool: Properly link to signal pagesTomeu Vizoso2012-02-201-1/+8
| |