| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
We enabled anonymous unions earlier, this is a bugfix to enable
anonymous structs.
https://bugzilla.gnome.org/show_bug.cgi?id=766011
|
|
|
|
|
| |
When resolving libraries, open the temp file generated by dumpbin
with 'r' mode rather than 'rb', since this is a text file.
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using the NMake Makefile within the Visual Studio projects, as we are
using dumpbin to resolve the .lib file that we link to, the outputs of
dumpbin is captured by the Visual Studio output panel, which causes it not
to be processed by proc.communicate(). This is due to dumpbin being an
integrated component of Visual Studio. In order to remedy this, we need to
use a temp file, and use the /out:<tempfile> flag, and look for the DLL
that is linked to by the .lib that we pass in.
https://bugzilla.gnome.org/show_bug.cgi?id=763739
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fix the syntax where we handle the exception during preprocessing, so that
we won't trigger a NameError when preprocessing fails, and so the error
would become clearer to people.
Reported by Cosimo Lupo.
https://bugzilla.gnome.org/show_bug.cgi?id=757126
|
|
|
|
|
|
|
| |
resolve_windows_libs() uses `gcc -print-search-dirs`. When we are cross
compiling with MinGW on linux, gcc uses ':' as path separator, not ';'.
https://bugzilla.gnome.org/show_bug.cgi?id=761981
|
|
|
|
|
|
|
|
| |
Allow to override it with the DLLTOOL environment variable, leaving
"dlltool" as a fallback when not defined so backward compatibility is
ensured.
https://bugzilla.gnome.org/show_bug.cgi?id=761984
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid crashes due to double shell in subprocess.Popen() on linux, e.g.:
```
>>> import subprocess
>>> subprocess.Popen(['/bin/sh', '/bin/sh'])
/bin/sh: /bin/sh: cannot execute binary file
```
https://bugzilla.gnome.org/show_bug.cgi?id=761982
|
|
|
|
|
|
|
|
| |
In cross-compilation the build system is unable to execute the compiled
binary. Give the possibility to use a launcher, e.g. wine for MinGW or
qemu for different CPU type.
https://bugzilla.gnome.org/show_bug.cgi?id=696773
|
|
|
|
|
|
|
|
|
| |
This reverts commit 0ff7ca94a608663649defc72021062de098853a8.
As reported by Ting-Wei Lan, this breaks builds with Clang, which
doesn’t support -Wno-cpp.
https://bugzilla.gnome.org/show_bug.cgi?id=757934#c5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using distutils.ccompiler means that we are forced to use the CFLAGS
from the system’s Python installation, which may contain
-D_FORTIFY_SOURCE. The user’s environment-provided CFLAGS may contain
-O0 (because they are a developer). These two flags cause a warning when
used together. Silence that warning by passing -Wno-cpp to disable
warnings from #warning preprocessor statements in the generated C code.
It doesn’t seem to be possible to selectively undefine _FORTIFY_SOURCE
or to stop using the compiler flags from distutils.sysconfig,
unfortunately.
https://bugzilla.gnome.org/show_bug.cgi?id=757934
|
|
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=760682
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=733535
|
|
|
|
|
|
|
|
|
|
|
|
| |
Python 3.5+ is now built with Visual Studio 2015, which now has a
refactored set of CRT DLLs where CRT functions are placed in, so we need
to acquire the _get_osfhandle() from the correct CRT DLL so that we can
pass around file descriptors correctly between different CRT versions.
This patch will enable Windows builds of introspection files using Python
3.5+ to work correctly.
https://bugzilla.gnome.org/show_bug.cgi?id=759531
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=752047
|
|
|
|
|
|
|
|
|
|
|
|
| |
On bug #719966, the question arose of whether parameters annotated with
(element-type) but not (not nullable) are regarded as nullable or
non-nullable.
Add some new unit tests to Regress-1.0.gir to check the behaviour is as
expected: annotating a parameter with (element-type) implicitly makes it
non-nullable (unless also annotated with (nullable)).
https://bugzilla.gnome.org/show_bug.cgi?id=757678
|
|
|
|
|
|
|
|
| |
If the file is new, set the permissions to 0644.
If the file with the name specified as --output exists, copy its
metadata onto the temporary output file.
https://bugzilla.gnome.org/show_bug.cgi?id=757442
|
|
|
|
|
|
|
| |
If the move resulted in EPERM, discard the temporary output file, but
raise the error so that the tool exits with a nonzero status.
https://bugzilla.gnome.org/show_bug.cgi?id=757442
|
|
|
|
|
|
|
| |
We need to encode the identifier-filter command to bytes, and decode its
outputs to ascii in order for it to work on Python 3.x.
https://bugzilla.gnome.org/show_bug.cgi?id=757126
|
|
|
|
|
|
|
|
| |
sys.exc_clear(), which was called when we need to ignore the error when
we can't embed manifests to the dumper program on MSVC 2010 and later,
is only available/needed for Python 2.7.x, so only use it there.
https://bugzilla.gnome.org/show_bug.cgi?id=757126
|
|
|
|
|
|
|
|
|
|
| |
Windows builds check the library that was passed into the introspection
scanner to deduce the correct DLL that is to be used by the .gir/.typelib
file, but this was not updated for Python 2.x/3.x compatibility, as the
outputs of a subprocess must be decoded. Fix this for both MSVC and
MinGW-based builds.
https://bugzilla.gnome.org/show_bug.cgi?id=757126
|
|
|
|
|
|
| |
This is checked for Python 2.7.x compatibility as well.
https://bugzilla.gnome.org/show_bug.cgi?id=757126
|
|
|
|
|
|
|
|
|
| |
Darwin's linker doesn't like "-rpath=path"; instead pass "-rpath path",
which works on more linkers than the version with the = sign does.
Additionally, Darwin's linker has no equivalent for "--no-as-needed" (it
seems to do the right thing by default?)
https://bugzilla.gnome.org/show_bug.cgi?id=625195
|
|
|
|
|
|
|
|
|
|
| |
g-ir-scanner now supports something like this:
typedef void my_callback(int);
Notice how my_callback is not a pointer.
https://bugzilla.gnome.org/show_bug.cgi?id=755645
|
|
|
|
|
|
|
| |
This allows building in both Python 2 and 3 by fixing a few
text/binary ambiguities and using "as" in an except clause.
https://bugzilla.gnome.org/show_bug.cgi?id=756763
|
|
|
|
|
|
|
| |
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
|