| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Updated from:
https://raw.githubusercontent.com/jcrocholl/pep8/1.6.2/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
|
|
|
|
|
|
| |
They're useless if we can just access the dict directly.
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
For background,
See https://bugzilla.gnome.org/show_bug.cgi?id=629682
See https://bugzilla.gnome.org/show_bug.cgi?id=689871
Basically we should emit a warning here.
https://bugzilla.gnome.org/show_bug.cgi?id=689998
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Otherwise we get warnings for params that have been skipped
https://bugzilla.gnome.org/show_bug.cgi?id=660352
|
|
|
|
|
|
| |
While looking for a different bug, I noticed that the introspectable
pass lists was missing GSList. And the warning was never set up
to fire anyways. Fix it and add a test.
|
|
|
|
|
|
|
| |
Use it to remove backcompat copies of functions that non introspectable
anyway.
https://bugzilla.gnome.org/show_bug.cgi?id=572408
|
|
|
|
|
|
|
| |
* don't skip those associated to a signal
* don't warn if it doesn't have an invoker
https://bugzilla.gnome.org/show_bug.cgi?id=637215
|
|
|
|
|
|
|
|
|
|
|
| |
Inside an alias definition, we only need the name of the alias target
type. Add a method to GIRWriter to write out a type reference rather
than full type definition and use it when writing out an alias.
Determine introspectableness of aliases in IntrospectablePass so functions
using aliases can be marked not-introspectable if the alias itself is not.
https://bugzilla.gnome.org/show_bug.cgi?id=629682
|
|
|
|
|
|
|
| |
Some API such as gtk_text_iter_get_char returns an individual
"gunichar"; we should support this.
https://bugzilla.gnome.org/show_bug.cgi?id=633197
|
| |
|
|
|
|
|
| |
Suppress a callback and virtual function warnings until
there's a clear way to document them.
|
|
|
|
|
| |
Send in block postions so we can get accurate line numbers
for warnings emitted from this class.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was a stupid abstraction split, we only support GObject.
* Clean up how we handle c:type - we only set it if we've actually
seen a corresponding structure.
* Add a warning if we don't see the structure typedef for an
interface, since that's pretty bogus. (And fix regress.h to have
one)
* Rename the "type_name" attribute internally to "gtype_name"
for clarity.
|
|
|
|
|
| |
For legacy library author convenience, propagate (skip) on e.g.
structures to all callables which use them.
|
|
|
|
|
| |
Move the remaining callsites over to the new message
module
|
|
|
|
|
|
|
|
| |
Before, Type instances could be indeterminate, holding a "ctype",
which means "This is some unresolved string". However, we also get
data from GType, so add gtype_name as another indeterminate state.
Clean up how we create and resolve Type instances from GType data.
|
| |
|
|
|
|
|
|
| |
First, we can't support constructors on unregistered types.
Second, warn if we see a return value of an unregistered.
|
|
|
|
| |
This works around the hidden GtkFileChooserEmbed interface of GtkFileChooserWidget.
|
|
One of the first big changes in this rewrite is changing the Type
object to have separate target_fundamental and target_giname properties,
rather than just being strings. Previously in the scanner, it was
awful because we used heuristics around strings.
The ast.py is refactored so that not everything is a Node - that
was a rather useless abstraction. Now, only things which can have
a GIName are Node. E.g. Type and Field are no longer Node.
More things were merged from glibast.py into ast.py, since it isn't
a very useful split.
transformer.py gains more intelligence and will e.g. turn GLib.List
into a List() object earlier. The namespace processing is a lot
cleaner now; since we parse the included .girs, we know the C
prefix for each namespace, and have functions to parse both
C type names (GtkFooBar) and symbols gtk_foo_bar into their
symbols cleanly. Type resolution is much, much saner because
we know Type(target_giname=Gtk.Foo) maps to the namespace Gtk.
glibtransformer.py now just handles the XML processing from the dump,
and a few miscellaneous things.
The major heavy lifting now lives in primarytransformer.py, which
is a combination of most of annotationparser.py and half of
glibtransformer.py.
annotationparser.py now literally just parses annotations; it's
no longer in the business of e.g. guessing transfer too.
finaltransformer.py is a new file which does post-analysis for
"introspectability" mainly.
girparser.c is fixed for some introspectable=0 processing.
|