| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=679160
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=656445
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
We don't need a basic getter for a private field - this isn't Java.
|
|
|
|
| |
This is a general code cleanup.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
_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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Makes it work on case-sensitive file systems such as HFS+.
https://bugzilla.gnome.org/show_bug.cgi?id=667405
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
"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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
This prevents a simple error from pkg-config, "Must specify package names
on command line"
https://bugzilla.gnome.org/show_bug.cgi?id=673668
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
This avoids a bit of python work and reduces the
amount of allocations.
|
|
|
|
|
| |
Only parse doc comments for the files we pass in
on the command line to g-ir-scanner, not the included dependencies.
|
| |
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=672254
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=672254
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=672254
|
| |
|
|
|
|
|
|
| |
These were apparently copied by mistake.
https://bugzilla.gnome.org/show_bug.cgi?id=667701
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|