| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Updated from:
https://raw.githubusercontent.com/jcrocholl/pep8/1.6.2/pep8.py
|
| |
|
|
|
|
|
|
| |
we haven't been emitting the warning for about six
years (see 7dbbda9abea9882d2c98726f382a905fa8738706)
so remove the leftovers...
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was reported by HeBD on #introspection that Python modules
use the .pyd extension on windows, not .dll.
The simple fix would have been to just rename to .pyd, but we
started investigating the possibility of acquiring the suffix tuple(s)
via imp.get_suffixes() instead. Which led to the discovery that
imp.load_module() simply ignores the first item of said tuple.
Thus, there is no use in pretending it to be of any importance
in this case so we set it to an empty string.
imp_load_module() source for:
Python 2.6.9 : https://hg.python.org/cpython/file/fcb3ec2842f9/Python/import.c#l3021
Python 2.7.10: https://hg.python.org/cpython/file/15c95b7d81dc/Python/import.c#l3148
and just to be future-proof:
Python 3.4.3 : https://hg.python.org/cpython/file/b4cbecbc0781/Lib/imp.py#l220
|
|
|
|
|
|
|
| |
Python 3 does not write .pyc files like Python 2
used to do but instead put's them in a __pycache__
directory. Simply compute the version hash using
the .py files instead.
|
|
|
|
|
|
|
| |
Not doing this manually all over the place makes
the code slightly more readable.
https://bugzilla.gnome.org/show_bug.cgi?id=689454
|
|
|
|
|
|
| |
02e545371e2132a97458888895cacf57b8c0f83a (2015-06-23)
https://bugzilla.gnome.org/show_bug.cgi?id=725685
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only types are stored in the cache store, so disable
the cache for reparse validate mode since it needs
access to the whole serialized tree.
This fixes a seemingly hard to debug build failure
running 'make distcheck' on source trees configured
with --enable-doctool.
https://bugzilla.gnome.org/show_bug.cgi?id=751238
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extract cache and data dir lookup code into documented
get_user_cache_dir() and get_system_data_dirs() functions.
Note that previously, the data dirs code did not fall
back to '/usr/local/share:/usr/share' when the XDG_DATA_DIRS
environment variable was either not set or empty, as required
by the XDG Base Directory Specification.
https://bugzilla.gnome.org/show_bug.cgi?id=747770
|
|
|
|
|
|
|
|
| |
We already use XDG_DATA_DIRS for .gir files lookup
so we might as well honor XDG_CACHE_HOME instead
of hardcoding ~/.cache.
https://bugzilla.gnome.org/show_bug.cgi?id=747770
|
|
|
|
| |
optparse is deprecated.
|
|
|
|
|
|
| |
conversion
https://bugzilla.gnome.org/show_bug.cgi?id=748832
|
|
|
|
|
|
|
|
|
|
| |
Add the command line flag --symbol-filter-cmd to g-ir-scanner
which allows running symbol names through a filtering shell
command. The symbol is sent as stdin to the filter command
and expects a filtered result written to stdout.
https://bugzilla.gnome.org/show_bug.cgi?id=744534
Signed-off-by: Garrett Regier <garrett.regier@riftio.com>
|
|
|
|
|
| |
remove stray debugging print statement introduced
in db7ab0e797f755fb7ff273a2071d27fd62a2b7c7
|
|
|
|
|
|
|
|
|
| |
It was assumed that cache store was always working, this
also removes a round trip to the cache store. So performance
should also get a small boost.
https://bugzilla.gnome.org/show_bug.cgi?id=746231
Signed-off-by: Garrett Regier <garrett.regier@riftio.com>
|
|
|
|
|
|
|
| |
Allow `identifier`, `parameter` and `tag` part `annotations` fields
to span multiple lines
https://bugzilla.gnome.org/show_bug.cgi?id=676133
|
|
|
|
| |
Synced with https://github.com/zzzeek/sqlalchemy/commit/a4a826021fb6d77fadbdac0071616d7e5486e4d1
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Rather than assuming that pkg-config is spelt pkg-config, use the environment
variable $PKG_CONFIG which is the actual detected pkg-config spelling. This is
particularly important when cross-compiling, where the pkg-config may be
prefixed with the target and will actually provide a different result from the
build pkg-config which may be available unprefixed.
https://bugzilla.gnome.org/show_bug.cgi?id=746669
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Otherwise API using it will badly break in weird ways.
https://bugzilla.gnome.org/show_bug.cgi?id=745608
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
What we already had:
- (array zero-terminated=1) > array which is NULL terminated
- (array zero-terminated=0) > array which is not NULL terminated
- (array) > array which is not NULL terminated
- (array zero-terminated=X) > array which is not NULL terminated
where X can be anything
What this patch adds:
- (array zero-terminated) > array which is NULL terminated
https://bugzilla.gnome.org/show_bug.cgi?id=657754
|
|
|
|
|
|
|
|
| |
Make it clear that both the dependencies field in the typelib, and the
include elements in the GIR AST, are for immediate dependencies, not
transitive ones.
https://bugzilla.gnome.org/show_bug.cgi?id=743782
|
|
|
|
|
|
|
| |
These may cause cpp to output code that still has #defines in them,
which the scanner does not expect.
https://bugzilla.gnome.org/show_bug.cgi?id=720504
|
|
|
|
|
|
|
|
|
| |
We have special code to look at (type GLib.List(utf8)), but (type
GLib.PtrArray(utf8)) didn't work.
This allows NetworkManager to annotate the ActiveConnections property.
https://bugzilla.gnome.org/show_bug.cgi?id=733879
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds options to scannermain so that we can decorate functions with
macros as needed, so that we can use compiler annotations for symbol export
for example.
Options are also added to include headers before or after the main include
block at the top so that we can include headers as necessary in the
generated sources and/or headers, so that we could for example grab
definitions from those headers as needed, such as to grab definitions of
macros used for symbol export.
The testcodegen.py script has been updated as well to make use of this
functionality, if needed.
https://bugzilla.gnome.org/show_bug.cgi?id=732669
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This updates giscanner/scannerlexer.l by ignoring the Visual C++-specific
directives, so that the scanner will not bail out while trying to produce
the introspection dumper program source code, and silence many of the
warnings that are produced in the process.
As the Visual C++ processor produces slightly different line markers, we
need to handle this here as well, otherwise the sources/headers would not
be processed to acquire the _get_type and _get_gtype symbols to put in the
introspection dumper sources, producing bad results.
https://bugzilla.gnome.org/show_bug.cgi?id=728313
|
|
|
|
| |
This reverts commit 7a82752734b496bb619fce62572c0c7f8578350a.
|
|
|
|
|
|
|
|
| |
Update everything.h include the header used to decorate symbols with the
macro for export and everything.c to include config.h first, and have the
symbols decorated with the aforementioned macro.
https://bugzilla.gnome.org/show_bug.cgi?id=732669
|
|
|
|
|
|
| |
New versions of msys2 provide a MINGW64 env variable instead.
https://bugzilla.gnome.org/show_bug.cgi?id=734163
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a CCompiler module for the giscanner Python scripts so that items
related to the run of the preprocessor, compiler and linker can be done in
this module, and this marks the beginning of the move of building the
introspection files using Python's distutils.
This patch first moves _add_[internal|external]_link_flags() to
ccompiler.py as get_[internal|external]_link_flags and also moves the
Windows shlibs resolution (deducing the DLLs the introspection files should
link to from the libraries passed in) in shlibs.py to
resolve_windows_libs() in ccompiler.py
https://bugzilla.gnome.org/show_bug.cgi?id=728313
|
|
|
|
|
|
|
| |
Use the special os.path.expanduser('~'), as it it more portable, instead of
quering the HOME or HOMEPATH envvar.
https://bugzilla.gnome.org/show_bug.cgi?id=732668
|
|
|
|
|
|
|
|
|
|
| |
On Windows, checking for $(HOME) will work in a MSYS shell but not in
cmd.exe (i.e. Visual Studio command prompt), so we need to check for
HOMEPATH when we are building under a Visual Studio command prompt to get
the users's home directory correctly. This will enable g-ir-doc-tool to
work on Windows when run from cmd.exe.
https://bugzilla.gnome.org/show_bug.cgi?id=732668
|
|
|
|
|
|
|
|
|
| |
Add the command line flag --identifier-filter-cmd to g-ir-scanner which
allows running identifier names through a filtering shell command. The
identifier is sent as stdin to the filter command and expects a filtered
result written to stdout.
https://bugzilla.gnome.org/show_bug.cgi?706898
|
|
|
|
|
| |
Add ANN_NULLABLE and ANN_OPTIONAL in the one (and only) other place that
ANN_ALLOW_NONE is mentioned...
|
|
|
|
|
|
|
| |
Add (nullable) and (optional) as recognised annotations in the same places that
(allow-none) is allowed. This should have been done in the previous
commits but the tests were passing because the only ill effect was that
a warning was issued.
|
|
|
|
|
|
|
| |
This reverts commit 0839e696e9fbc1942ac5c61054de3b47e9578152.
This was accidentally picked up by my 'git bz apply' against the bug as
I was getting ready to push the last set of changes.
|
|
|
|
|
|
|
|
| |
In the case that a parameter has not been explicitly annotated, the
value of node.direction will be None, not 'in'. Instead of comparing as
== 'in' we should therefore check for being != 'out'.
https://bugzilla.gnome.org/show_bug.cgi?id=660879
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
Add two new annotations, (nullable) and (optional).
(nullable) always means "the type of this value can also contain null".
(optional) always means "this out parameter can be ignored by passing
NULL to the C function".
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the 'allow_none' field on parameters with two separate fields:
'nullable' and 'optional'.
Currently, we use 'nullable' to mean the same thing as 'allow-none' for
normal (non-out) parameters. For out parameters, we use the 'optional'
field instead.
Note that the special case for GCancellable and GAsyncReadyCallback is
already guarded by a check for being an in parameter, so we always use
'nullable' here.
On the .gir writer side, we decide which variable to consult when
writing the allow-none attribute depending on the parameter direction.
https://bugzilla.gnome.org/show_bug.cgi?id=660879
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We treat GCancellable and GAsyncReadyCallback as if they were always
tagged (allow-none) because these parameters universally allow %NULL to
be given as a value when they appear as in parameters on functions.
Unfortunately, the meaning of (allow-none) is different on out
parameters. There it means that you can give %NULL to ignore the return
value.
Limit this special case to only in parameters.
https://bugzilla.gnome.org/show_bug.cgi?id=660879
|
|
|
|
|
|
|
|
|
|
|
|
| |
We assign node.allow_none in two separate cases:
- if the (allow-none) annotation was given
- for GCancellable and GAsyncReadyCallback, as special cases
Split the two up. This will simplify future commits.
https://bugzilla.gnome.org/show_bug.cgi?id=660879
|
|
|
|
|
|
|
|
|
| |
The old annotationparser.py happily parsed this, but
giscanner/girwriter.py never serialized an allow-none
attribute to the .gir file and girepository/girparser.c
never looked for an allow-none attribute either.
https://bugzilla.gnome.org/show_bug.cgi?id=660879
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|