| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Add the command line flag --identifier-filter-cmd to g-ir-scanner which
allows running identifier names through a filtering shell command. The
identifier is sent as stdin to the filter command and expects a filtered
result written to stdout.
https://bugzilla.gnome.org/show_bug.cgi?706898
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove GInitiallyUnowned special case in gdumpparser where fields are
copied from GObject. Add generic solution where anytime we have multiple
typedef structs, the fields become shared:
typedef struct _Foo Foo;
typedef struct _Foo Bar;
struct _Foo {...};
https://bugzilla.gnome.org/show_bug.cgi?id=581525
|
|
|
|
|
|
|
|
|
| |
Move exception handling of various symbol/identifier stripping into the
outer level parse function. This removes a lot of embedded try excepts
peppered throughout the code by letting exceptions flow to the top level
where they can be handled just as gracefully.
https://bugzilla.gnome.org/show_bug.cgi?id=581525
|
|
|
|
|
|
|
|
|
| |
Remove the caching of typedefs in Transformer._typedef_ns. This is no longer
used due to the added _tag_ns cache which store tags rather than typedefs.
Remove adding of callback typdefs to the typedef_ns since these were not
being used anyhow.
https://bugzilla.gnome.org/show_bug.cgi?id=581525
|
|
|
|
|
|
|
| |
Generalize _create_tag_ns_struct for both structs and unions. Remove
_create_compound newer struct parsing code has completely replaced it.
https://bugzilla.gnome.org/show_bug.cgi?id=581525
|
|
|
|
|
|
|
|
| |
Add _create_member_struct for the parsing of nested structs. This is
precursory work to remove the member/anonymous flag from other struct/union
creation code and allow simplification of those code paths.
https://bugzilla.gnome.org/show_bug.cgi?id=581525
|
|
|
|
|
|
|
|
|
| |
Add structs parsed from C's "tag namespace" into their own cache for lookup
by typdef parsing. This fixes issues where a typedef declared after a
struct would not have a correct name. This also cleans up the need for
special casing struct tags prefixed with an underscore.
https://bugzilla.gnome.org/show_bug.cgi?id=581525
|
|
|
|
|
|
|
|
| |
Aliasing TRUE or FALSE is not very common, but done occasionally
for extra clarity. Namely G_SOURCE_REMOVE / G_SOURCE_CONTINUE are
self-explanatory, unlike the "raw" booleans.
https://bugzilla.gnome.org/show_bug.cgi?id=719566
|
|
|
|
| |
tests/warn/unkown-parameter.h:41 still passes with this...
|
|
|
|
|
| |
Last call sites where removed in 36aa515f1036978ced8d4ffb808260844f7229e0
about 3 years ago.
|
|
|
|
|
| |
Updated from:
https://raw.github.com/jcrocholl/pep8/1.4.6/pep8.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
The transformer doesn't need the annotations, so why are
we giving it to it?
https://bugzilla.gnome.org/show_bug.cgi?id=699854
|
|
|
|
|
|
| |
It's more readable and as an added bonus Python 3 compatible.
https://bugzilla.gnome.org/show_bug.cgi?id=697616
|
|
|
|
|
|
|
| |
This fixes the Pango build where it has a chain of two
--include-uninstalled.
https://bugzilla.gnome.org/show_bug.cgi?id=694593
|
|
|
|
| |
Continuation of previous work.
|
|
|
|
|
|
|
|
|
|
|
| |
The .gir format has a weird legacy where stuff like the includes are
outside of the <namespace>. But conceptually they're tied together,
so let's start reflecting this in the code.
This way we can just pass around and look at a Namespace object
instead of a 4-tuple of (namespace, includes, c_includes, pkg_config).
https://bugzilla.gnome.org/show_bug.cgi?id=694593
|
|
|
|
|
|
|
| |
While this is a bit lame, we need to do something. We preserve the
warning message.
https://bugzilla.gnome.org/show_bug.cgi?id=694593
|
|
|
|
| |
Fixes the NetworkManager build.
|
|
|
|
|
|
|
|
| |
This ensures that things can't try to reference undefined/invalid types
without emitting warnings, and that users need to include other GIRs at
build time if they want to reference another type.
https://bugzilla.gnome.org/show_bug.cgi?id=693098
|
|
|
|
|
|
|
| |
These params are unannotatable and undocumentable. They really
should not be allowed.
https://bugzilla.gnome.org/show_bug.cgi?id=693098
|
|
|
|
|
|
|
|
|
|
| |
While there's no particular reason I need to do this, there
really isn't any reason to not do this, and it helps with doctool
or whatever in the future if we want to document when a constant
showed up. g-ir-compiler also keeps track of constant deprecations,
so this fixes constants not ever being deprecated.
https://bugzilla.gnome.org/show_bug.cgi?id=693040
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
|
|
| |
This matches our behavior for symbols (and we should probably fix this
more globally...I think we still scan _-prefixed enums).
Noticed from gudev which had #define _GUDEV_INSIDE_H 1
https://bugzilla.gnome.org/show_bug.cgi?id=674072
|
|
|
|
|
| |
Use namespaces in dependencies before falling back to the deprecated
--identifier-prefix prefixes.
|
|
|
|
|
|
|
|
| |
Instead of crashing. For more details, see the attached bug.
Based on a patch by Stef Walter <stefw@gnome.org>.
https://bugzilla.gnome.org/show_bug.cgi?id=684370
|
| |
|
|
|
|
|
|
|
|
|
| |
This let the macro expands to its value as gint64/guint64.
Also
- fix lexer identifier/typdef detection for macro and misc
- do not discard cast
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
This is a general code cleanup.
|
|
|
|
|
| |
Add an annotation tag "Value:" which can be used on
constants to override the value.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This applies mainly to GValue, which is defined as:
struct _GValue
{
/*< private >*/
GType g_type;
/* public for GTypeValueTable methods */
union {
gint v_int;
guint v_uint;
glong v_long;
gulong v_ulong;
gint64 v_int64;
guint64 v_uint64;
gfloat v_float;
gdouble v_double;
gpointer v_pointer;
} data[2];
};
Previously, the scanner did not understand the array of unions. This
resulted in g_struct_info_get_size returning an incorrect size for
GValue (at least on 32bit systems).
Fix this by making up a separate union declaration for the GIR that can
be referenced by the array.
https://bugzilla.gnome.org/show_bug.cgi?id=657040
|
|
|
|
|
|
|
| |
... on Windows as it points to the MinGW installation directory,
which doesn't have any .gir files to start with anyway.
https://bugzilla.gnome.org/show_bug.cgi?id=620566
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* In order to suppress unnecessary warnings on macros which are skipped
at later passes of the scanning, we use the annotations to skip
AST stuff being created for symbols that are skipped.
|
|
|
|
|
| |
Generating Python source code is problematic for srcdir != builddir;
steal a the trick of putting global data in __builtins__ from jhbuild.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Scanner tries to detect caller-allocates attribute automatically if
not explicitly specified by checking that parameter is not double-referenced
and is struct or union. This patch adds resolving of aliases when
checking whether parameter is struct or union.
Also removes old incorrect method transformer.follow_aliases, which
was never used in current code.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=639081
|
|
|
|
|
|
| |
The assumption is that the only allowed source encoding
is utf-8. Always strings as unicode and fix up the transformer
and xml writer to properly output utf-8.
|
|
|
|
|
| |
Somehow, this regressed; i have no idea how. We need to be
comparing Include objects, not string versus Include.
|
|
|
|
| |
This is a follow-up to 60a8c75 which wasn't properly fixed.
|
|
|
|
|
|
|
| |
Remove enum members which follows /* <private> */ comments
inside the transformer instead of the sourcescanner itself.
Fixes a crash when creating the gir for GstBase.
|
|
|
|
| |
This reverts commit ad4934ca1d44285ab46d6e419d1788b886e48d82.
|
|
|
|
| |
Do not warn about hidden symbols.
|
|
|
|
| |
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=594125
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only store types that can be referenced in the cache store
this reduces the size of the serialized Gtk-3.0.gir in the store
from 5.7M to 366k on my system.
It also reduces the time it takes to create a gir in gtksourceview
by 35% and the time to run the warnings test by more than 50%
This also disables the cache for passthrough mode since it needs
access to the whole serialized tree.
|