| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This is apparently used in Gee-0.8 and Folks-0.6.
|
|
|
|
|
|
|
| |
The position attributes on a <doc> element are not mandatory, so we
should have some fallback value if they are missing.
Fixes: #252
|
|
|
|
| |
We only support 3.4+ now.
|
|
|
|
|
|
|
|
|
|
|
| |
Some documentation tool (as hotdoc[0]) need to have information about
symbol declaration and documentation positions in the source files
to be able to do smart indexing (automatically build the documenation
index).
[0] https://hotdoc.github.io/
Fixes #175
|
|
|
|
|
|
|
| |
We already require python 2.7, and it has OrderedDict and Counter.
Besides cleaning up unmaintained code, this change found and fixed
a Python 3 bug where we were iterating over a dict while changing it.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gpointer parameters and return types should be marked as nullable by
default, unless:
• also annotated with (type) and not with (nullable); or
• explicitly annotated with (not nullable).
This introduces the (not nullable) annotation as a direct opposite to
(nullable). In future, (not) could be extended to invert other
annotations.
https://bugzilla.gnome.org/show_bug.cgi?id=729660
|
|
|
|
|
|
|
|
|
|
| |
It is useful for navigating the AST to have a link from each
TypeContainer instance (e.g. each Parameter and Return) to the parent
AST node, such as a Function.
This will be used in the g-ir-diff tool.
https://bugzilla.gnome.org/show_bug.cgi?id=747979
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add unicode_literals future import which turns any string literal
into a unicode string. Return unicode strings from the Python C extension
module. Force writing of annotations (g-ir-annotation-tool) to output utf8
encoded data to stdout.
This is an initial pass at following the "unicode sandwich"
model of programming (http://nedbatchelder.com/text/unipain.html)
needed for supporting Python 3.
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|
|
|
|
|
|
|
| |
Use future import "print_function" and update relevant uses of print
as a function call. See: PEP 3105
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|
|
|
|
|
|
|
|
|
|
| |
Import Python 3 compatible "true division" from the future (PEP 238).
This changes the Python 2 classic division which uses floor division
on integers to true division. Verfied we don't actually use the
division operator anywhere in the code base so this a safety for
supporting both Python 2 and 3.
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|
|
|
|
|
|
| |
Use absolute_import to ensure Python 3 compatibility of the code base.
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|
|
|
|
|
|
|
|
| |
Convert the results map() calls to a list for Python 3 compatibility.
In Python 3, map() returns an iterable "map object" which does not
allow indexing or iteration more than once.
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|
|
|
|
|
|
|
|
| |
288b339edf262f1dba4e87a9faef46cc79749bd5 changed the signature from
def _parse_type_second_pass(self, parent, node, typeval):
to
def _parse_type_array_length(self, siblings, node, typeval)
but failed to change the assert statement accordingly.
|
|
|
|
|
|
|
|
|
|
| |
Doing so reveals GIRParser did not yet support:
- the (skip) annotation on parameters and return values
- the (attributes) annotation
This patch fixes both issues an prevents further similar problems.
https://bugzilla.gnome.org/show_bug.cgi?id=738171
|
|
|
|
|
|
|
|
|
|
| |
Promote the 'nullable' field to the TypeContainer base class (which is
shared by Return and Parameter types).
Add .gir support for nullability on return values, both in the writer
and in the (scanner's) parser.
https://bugzilla.gnome.org/show_bug.cgi?id=660879
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Record our internal 'nullable' and 'optional' attributes into the
written .gir file. It is now theoretically possible to express the
concept of an out parameter with a nullable type (although presently
there is no way to do this).
Modify our own internal parser (in the scanner) to understand the
newly-written attributes.
Update the expected output of the 'Regress-1.0.gir' test to account for
the new attributes.
Nothing else understands 'nullable' yet, but the girparser in the
typelib compiler already understands 'optional' and records a bit for it
in the typelib.
https://bugzilla.gnome.org/show_bug.cgi?id=660879
|
|
|
|
| |
Make sure to set the parent of the function
|
|
|
|
| |
Related to: https://bugzilla.gnome.org/show_bug.cgi?id=710561
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 />".
|
|
|
|
|
| |
Last call sites where removed in 36aa515f1036978ced8d4ffb808260844f7229e0
about 3 years ago.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
This makes it only use kwargs
https://bugzilla.gnome.org/show_bug.cgi?id=693876
|
|
|
|
|
|
|
|
| |
g-ir-doc-tool wants to use the instance parameter to read docs
and the parameter name, so it needs to be shuttled through the
GIR.
https://bugzilla.gnome.org/show_bug.cgi?id=693040
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
pylint was complaining about the non-existent instance member,
self._filename
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
|
| |
|
|
|
|
|
| |
Add an annotation tag "Value:" which can be used on
constants to override the value.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Make sure that fundamental attribute and associated
functions (ref-func, unref-func, set-value-func and get-value-func)
are parsed, otherwise we fail reparse-validating girs containing
fundamentals.
|
| |
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
For generating documentation, we actually want to preserve these.
https://bugzilla.gnome.org/show_bug.cgi?id=656389
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
* gdumpparser.py was incorrectly passing the ctype for transfer
* Property constructor wasn't actually doing anything with passed transfer
* Parse transfer-ownership in girparser
|
|
|
|
|
|
|
| |
Previously we were just looking for <type> inside a GLib.List,
but it may be <array>.
See bug 637262 for code that triggered this.
|
| |
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
* 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
|