| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
They're just internal bits for users of C, shouldn't be part of the
API.
https://bugzilla.gnome.org/show_bug.cgi?id=755882
|
|
|
|
|
|
|
| |
The nullable code needs to search via index lookup of closure_name,
which drops the need to (incorrectly) assign closure_name again.
https://bugzilla.gnome.org/show_bug.cgi?id=756352
|
|
|
|
|
|
|
| |
Node is always present in the output of .log_node(), so printing it
another time as context just adds noise.
https://bugzilla.gnome.org/show_bug.cgi?id=756088
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
All user_data pointers should be nullable, and they should all be
annotated as closures too. I have not found any counter-examples where a
closure is non-nullable.
https://bugzilla.gnome.org/show_bug.cgi?id=729660
|
|
|
|
|
|
|
|
| |
Otherwise the .gir can contain invalid data which would
likely cause a crash at runtime.
https://bugzilla.gnome.org/show_bug.cgi?id=752044
Signed-off-by: Garrett Regier <garrett.regier@riftio.com>
|
|
|
|
|
|
|
| |
These can easily be misunderstood, especially optional.
https://bugzilla.gnome.org/show_bug.cgi?id=752065
Signed-off-by: Garrett Regier <garrett.regier@riftio.com>
|
|
|
|
|
|
|
| |
The mapping to long int types seems bogus; the code above it did the right
thing, but only for size_t.
https://bugzilla.gnome.org/show_bug.cgi?id=756016
|
|
|
|
|
|
|
|
| |
MessageLogger.get() calls the class constructor without arguments.
The __init__ signature, however, did not default the namespace parameter,
so any usage of the logging functions caused a bogus exception.
https://bugzilla.gnome.org/show_bug.cgi?id=755890
|
|
|
|
|
|
|
| |
This is an alias of Parameter.argname, which makes it easier to
duck-type debugging of AST nodes by printing out their name property.
https://bugzilla.gnome.org/show_bug.cgi?id=747979
|
|
|
|
|
|
|
|
| |
Instead of storing a direction property on both Parameter and Return
separately, hoist it up to TypeContainer so it’s inherited. This neatens
things up a bit, but doesn’t really change anything in practice.
https://bugzilla.gnome.org/show_bug.cgi?id=747979
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
The optional annotation was being applied which
is invalid for return values.
https://bugzilla.gnome.org/show_bug.cgi?id=752029
Signed-off-by: Garrett Regier <garrett.regier@riftio.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Sort the parameters displayed for the "unknown parameters"
error message. The parameter names are stored in a set which
returns a different ordering between Python 2 and 3
(set/dict ordering should not be relied upon anyhow).
This fixes test failures in warning tests.
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|
|
|
|
|
|
|
|
|
|
| |
Add lt, le, gt, ge, eq, ne, and hash dunder methods to all classes that
implement custom comparisons with __cmp__. This is needed to support Python 3
compatible sorting of instances of these classes.
Avoid using @functools.total_ordering which does not work for some of these
classes and also is not available in Python 2.6.
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|
|
|
|
|
|
|
|
|
| |
Convert the results of various filter() calls to lists. This is
needed because filter() returns a generator in Python 3 and len()
checks are used on the results (which doesn't work on a generator).
Explicitly open resulting files for output in binary mode.
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|
|
|
|
|
|
|
|
| |
Use key function instead of cmp for list.sort which is compatible
with both Python 2 and 3. Make sure a list is returned from split
function. Don't use identity comparison "is" on strings.
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|
|
|
|
|
|
|
| |
ASCII encode bytes sent to subprocess.stdin.write to ensure
Python 2 and 3 compatibility.
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|
|
|
|
|
|
|
| |
Decode the output of various subprocess calls assuming ascii
encoding.
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace usage of the Python 2 cStringIO module with StringIO and
conditionally use io.StringIO for Python 3. This is needed to build
up a unicode version of the XML since cStringIO does not support
unicode. Add XMLWriter.get_encoded_xml() which returns a utf-8 encoded
bytes object of the XML data.
Open files for reading/writing in binary mode since we explicitly
encode and decode as utf-8.
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|
|
|
|
|
|
|
|
| |
This adds compatibility with Python 3 which removed the
cPickle module.
Explicitly use binary files for reading and writing the cache.
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|
|
|
|
|
|
|
|
|
| |
Define portable macros for use between Python 2 and 3.
Replace usage of PyString related functions with PyBytes.
Update pygi_source_scanner_parse_macros to support both
PyBytes and PyUnicode.
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
Replace occurances of "%r" (repr) in format strings where the intended
behaviour is to output a quoted string "'foo'" with explicit usage
of "'%s'". This is needed to move the codebase to unicode literals
in order to upgrade to Python 3. Python 2 unicode strings are expanded
with repr formatting prefixed with a "u" as in "u'foo'" which causes
failures for various text formatting scenarios.
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
|
|
|
|
|
|
|
| |
Replace usage of iteritems() and itervalues() with items() and values()
respectively.
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
|
|
|
|
|
|
|
| |
Explicitly open files for comparison in utils.files_are_identical()
in binary mode for reading (rb).
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|
|
|
|
|
| |
One of the Anaconda developers hit this; the fix was to include
GObject, but without this commit we just traceback'd.
|
|
|
|
| |
More followup to https://bugzilla.gnome.org/show_bug.cgi?id=752047
|
|
|
|
| |
Should help debugging.
|
|
|
|
| |
This reverts commit 232f3c831260f596e36159112292897962a505b4.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Atk has a "typedef GSList AtkAttributeSet", which causes
an ast.Alias() targeting a ast.List(). The latter has a
target_fundamental of '<list>', which cannot be looked
up in ast.type_names (because it's not a real fundamental
type), and that breaks the build.
It turns out that we don't need to find the fundamental
type and then the fundamental type node - the target
field of the ast.Alias already points to the desired
type node.
https://bugzilla.gnome.org/show_bug.cgi?id=755681
|
|
|
|
|
|
| |
It broke at least atk and mutter.
This reverts commit 5ae7bd58b6266997b61d897ad6562118eeb59210.
|
|
|
|
|
|
|
|
| |
This is an issue in various code bases and tends
to confuse newcomers.
https://bugzilla.gnome.org/show_bug.cgi?id=752047
Signed-off-by: Garrett Regier <garrett.regier@riftio.com>
|
|
|
|
|
|
|
|
| |
Some packages such as GEGL set macro defines directly into CFLAGS,
and distutils don't handle those with quotes well, so we need to deal
with them seperately.
https://bugzilla.gnome.org/show_bug.cgi?id=753428
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add compile() and link() functions in ccompiler.py to call
distutils.ccompiler's compiler() and link() functions, so that we
can in turn call them from dumper.py as needed. Note that for
linking the dumper program when building with libtool, we are still
using the original method of constructing the link command line
and running that command line, as distutils and libtool do not get
along well with each other. For non-libtool builds, such as MSVC
builds, we would link the dumper program using distutils.
For MSVC builds, we need to ignore mt.exe failing to find a
.exe.manifest file as Visual Studio 2010+ do not generate such files
during linking, and it is done by distutils as Python 2.7.x is built
with Visual Studio 2008, which do generate such manifest files during
the build.
https://bugzilla.gnome.org/show_bug.cgi?id=753428
|
|
|
|
|
|
|
|
| |
This should allow `CC='ccache gcc'` or the like to work.
https://bugzilla.gnome.org/show_bug.cgi?id=753949
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
|
|
|
|
|
|
| |
Ensures files are correctly and immediately closed.
https://bugzilla.gnome.org/show_bug.cgi?id=751926
|
|
|
|
|
|
|
|
| |
Using tempfile.mkstemp should prevent the temp file
from being cleaned while it might still be used by
another process.
https://bugzilla.gnome.org/show_bug.cgi?id=751926
|
|
|
|
|
|
|
|
|
| |
This reverts commit 7ce646db1cb0842db2089df671b17081f82f2b0a.
Apparently this patch caused introspection build breakage for gnome-shell,
as problems occurred during linking for libgnome-volume-control.
Please see bug 728313 comment 105 for more details.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add compiler() and link() functions in ccompiler.py to call
distutil.ccompiler's compile() and link() functions, so that we can in turn
call them from dumper.py to build the dumper program. As distutils don't
get along well with libtool libraries (ie .la files), we can deduce the
libraries to link from using the file name .la file and include
$(builddir)/.libs in the linking stage.
For MSVC builds, we need to ignore mt.exe failing to find a .exe.manifest
file as Visual Studio 2010+ do not generate such files during linking, and
it is done by distutils as Python 2.7.x is built with Visual Studio 2008,
which do generate such manifest files during the build.
https://bugzilla.gnome.org/show_bug.cgi?id=728313
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a preprocess() function in ccompiler.py so that it will call the
preprocess() method of the distutils.ccompiler class, and make use of it
from sourcescanner.py.
As we would need to set up the options (include paths, macros, undefs) to
pass into the preprocessor (and later for the compiler), we have a new
private function that translates what we have from the rest of giscanner so
that it could be passed to distutils.ccompiler in a way that it
understands.
Also, as the MSVCCompiler classes in distutils do not provide a
preprocess() implementation, we provide our own so that we can use it when
preprocessing, via distutils, through subclassing MSVCCompiler.
https://bugzilla.gnome.org/show_bug.cgi?id=728313
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This updates the __init__ constructor method of CCompiler so that distutils
can be used, with some environment or user-supplied options to create the
compiler instance that is appropriate with the platform that the giscanner
scripts are being run on, and sets some specific environment for the
compilers as necessary. This also adds a check_is_msvc() method that will
progressively replace calls in the other giscanner scripts that attempt to
check for CC=cl (or so), where a part of which is done in this patch. This
is done for dumper.py as well as it needs to be updated in this patch to
use the updated ccompiler.py which uses distutils to initiate the compiler
instance.
Also, as we have been using the --library option on Windows to pass in the
library (not DLL) to deduce the correct DLL to link to in the introspection
files for some time, we no longer need to make a copy of the library (.lib)
to introspect that matches the <namespace>-<namespace_version>.lib
convention, but use the libraries that were passed in with --library
directly, so that we can link the dumper program during the introspection
build.
Please note that this also partially reverts commit c9cfa2b as the
distutils items are clearly needed for these to work.
https://bugzilla.gnome.org/show_bug.cgi?id=728313
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As we attempt to move giscanner to use distutils for preprocessing and
building the introspection dumper program, we need to update _parse(),
where the preprocessor is called, to not use stdin and stdout for the
preprocessor input and output, as distutils do not accept such usage.
The added bonus for this change is that MSVC builds can be done without
using MinGW/GCC as a helper, as the '-' flag for preprocessing from stdin
was the hindrance to that.
https://bugzilla.gnome.org/show_bug.cgi?id=728313
|
|
|
|
| |
Forgot to amend.
|