| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
A hidden exception was being thrown (which we now log), due to fields
being treated as function parameters. Fixed to make field array
annotations be transformed and written out to the gir correctly.
https://bugzilla.gnome.org/show_bug.cgi?id=710561
|
|
|
|
|
|
| |
annotationparser.py already stores attributes in a mapping so
it makes little sense using a list of tuples (suggesting
multiple duplicate keys would be allowed) on the ast side.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GTK-Doc description fields for tags can contain multiple lines and
even multiple paragraphs. Whitespace cannot be preserved in XML
attributes, so we move the "deprecated" description text into
a "<doc-deprecated />" element right next to where we already have
the "<doc />" element. Keep the "deprecated" attribute around for
backwards compatibility though, but set its value to "1" (analogous
to the "writable", "contruct", etc attributes) if the annotated
symbol is marked as deprecated.
While at it, add <doc-version /> and <doc-stability /> which
was not yet available in the .gir files...
This takes care of the "Since:", "Stability:" and "Deprecated:"
GTK-Doc tags. Nothing needs to be done for the "Returns:" tag as
as we already write a "<doc />" child element on "<return-value />".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
because we'll add more related code to collections later on
https://bugzilla.gnome.org/show_bug.cgi?id=699536
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
g-ir-scanner can be a bit on the slow side. While true we
now do a bit more work parsing GTK-Doc comment blocks and
more is still to come, one of the biggest hotspots besides
what's going on in _giscanner.SourceScanner() comes from
the OrderedDict implementations we have been using.
For example, time needed to build Gtk-3.0.gir on a relatively
slow machine using "python2 -m cProfile -o $prefix/bin/g-ir-scanner ...":
1) Our original DictMixin sublass:
92,79867 seconds
2) Python's collections.OrderedDict class:
88,65786 seconds
3) Larosa/Foord implementation from http://www.voidspace.org.uk/python/odict.html :
71,64323 seconds
4) SqlAlchemy's implementation:
66,12449 seconds
Looks like we have a clear winner with the SqlAclchemy
implementation, which comes in at around 20 seconds
without profiling on the same machine. Not bad.
https://bugzilla.gnome.org/show_bug.cgi?id=697620
|
|
|
|
| |
Continuation of previous work.
|
|
|
|
| |
Continuation of previous work.
|
|
|
|
| |
Continuing on with previous commit.
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
This could be done manually by the caller, but it's better if we're
consistent here, since we do traverse fields.
https://bugzilla.gnome.org/show_bug.cgi?id=694593
|
| |
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=693876
|
|
|
|
|
|
|
|
|
| |
The eventual model I want to have is that .parent is the "container"
of the node. In all the cases where we don't explicitly set the parent,
this is the namespace, but having this under one field name would be
a big cleanup for the docwriter.
https://bugzilla.gnome.org/show_bug.cgi?id=693876
|
|
|
|
|
|
|
| |
If there's an unresolved type for an annotation, it's very likely
it's using a target_giname.
https://bugzilla.gnome.org/show_bug.cgi?id=693598
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Nothing too specific, just something to help with debugging.
https://bugzilla.gnome.org/show_bug.cgi?id=693098
|
|
|
|
|
| |
This will be used by the doctool to properly identify the
instance parameter.
|
|
|
|
|
| |
This will be used by the doctool to show the self parameter in C
and Python docs.
|
| |
|
|
|
|
|
|
|
| |
We need this for the doctool so that we can link to an enum
definition when we reference one of the member values.
https://bugzilla.gnome.org/show_bug.cgi?id=693040
|
|
|
|
|
|
|
|
|
| |
The doctool eventually wants to parse inline references to
constant values like %GTK_TEXT_DIRECTION_LTR, so we need to
have a way to look up the original symbol value for an enum
member.
https://bugzilla.gnome.org/show_bug.cgi?id=693040
|
|
|
|
|
|
|
| |
Properties have it, there is no reason for Field not to, and in this
way mallard docs can treat a field almost like a property.
https://bugzilla.gnome.org/show_bug.cgi?id=683046
|
|
|
|
|
|
|
|
| |
Traverse appended nodes for methods, so that namespace.symbols contains
all known symbols and not just global functions.
Also, ensure that all relevant nodes are appended when parsing GIRs.
https://bugzilla.gnome.org/show_bug.cgi?id=683046
|
|
|
|
|
|
|
| |
In order to be able to linkify a constructor/method, we need
to first track it by symbol.
https://bugzilla.gnome.org/show_bug.cgi?id=682969
|
|
|
|
|
|
|
|
| |
A symbol isn't a ctype. None of the tests failed when I removed
this, git blame wasn't very enlightening, and we don't remove this
in the remove method, so I'm thinking it's an error.
https://bugzilla.gnome.org/show_bug.cgi?id=682969
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=679160
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
We don't need a basic getter for a private field - this isn't Java.
|
|
|
|
| |
This is a general code cleanup.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
| |
Add an annotation tag "Value:" which can be used on
constants to override the value.
|
|
|
|
|
|
|
|
|
| |
It should be safe for bindings to assume that GPtrArrays hold only
pointers (or values as big as it), so there is no need to go through
hoops for converting smaller integers when marshalling.
Libraries that need arrays of integers should use GArray.
https://bugzilla.gnome.org/show_bug.cgi?id=652753
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This uses the same backcompat machinery that was introduced for static
methods for non-class types, so this change does not break users of the
existing presentations.
New libgirepository API:
g_enum_info_get_n_methods
g_enum_info_get_method
https://bugzilla.gnome.org/show_bug.cgi?id=656499
|
|\
| |
| |
| |
| |
| | |
Conflicts:
.gitignore
tests/scanner/Regress-1.0-expected.gir
|
| | |
|
| |
| |
| |
| |
| |
| | |
This adds all GSignalFlags into the gir.
https://bugzilla.gnome.org/show_bug.cgi?id=656457
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of storing the name of the function to call to get the
error quark, store the string form of the error quark, which
we derive from the introspection binary during scanning.
Update EnumBlob and GIEnumInfo to include the new information.
This will allow determining a back-mapping from error quark
to error domain without having to dlsym() and call all the
known error quark functions.
Based on earlier patches from Owen Taylor and Maxim Ermilov.
https://bugzilla.gnome.org/show_bug.cgi?id=602516
|
| |
| |
| |
| |
| |
| |
| |
| | |
Gdk.Rectangle is 'boxed alias', which is not currently weel supported
by g-i. Work around by transforming Gdk.Rectangle gtype into
cairo.RectangleInt.
https://bugzilla.gnome.org/show_bug.cgi?id=655423
|
| | |
|
| |
| |
| |
| |
| |
| | |
This adds all GSignalFlags into the gir.
https://bugzilla.gnome.org/show_bug.cgi?id=656457
|
| |
| |
| |
| |
| |
| |
| | |
Use it to remove backcompat copies of functions that non introspectable
anyway.
https://bugzilla.gnome.org/show_bug.cgi?id=572408
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of just handling static methods for classes, handle them for:
- Records and boxed
- Unions
- Interfaces
Based on a patch by Owen Taylor.
https://bugzilla.gnome.org/show_bug.cgi?id=572408
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of storing the name of the function to call to get the
error quark, store the string form of the error quark, which
we derive from the introspection binary during scanning.
Update EnumBlob and GIEnumInfo to include the new information.
This will allow determining a back-mapping from error quark
to error domain without having to dlsym() and call all the
known error quark functions.
Based on earlier patches from Owen Taylor and Maxim Ermilov.
https://bugzilla.gnome.org/show_bug.cgi?id=602516
|
|/
|
|
|
|
|
|
| |
Gdk.Rectangle is 'boxed alias', which is not currently weel supported
by g-i. Work around by transforming Gdk.Rectangle gtype into
cairo.RectangleInt.
https://bugzilla.gnome.org/show_bug.cgi?id=655423
|