| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|
|
|
|
|
|
|
| |
This should fix race conditions when multiple processes attempt to
access the cache concurrently.
https://bugzilla.gnome.org/show_bug.cgi?id=724886
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'ok' != 'return_value', and we never restore 'Returns:'.
At the same time, do the same fix for (out) parameters if the
return value is void, so this
void my_object_get_foo (MyObject *object, Foo *)
is turned into
function get_foo() : Foo
Returns: ....
|
| |
|
|
|
|
|
|
|
|
|
|
| |
GClosures are represented in gjs as JS functions for in
parameters, so it makes sense to use Function in place of
the boxed structure (which is also not part of the documentation)
Note that GClosures returned from C code are marshalled
as boxed types, but this is a gjs bug really, and JS code
should never touch them.
|
|
|
|
| |
They are enums after all.
|
|
|
|
|
|
| |
GValues are transparently marshalled by GJS, so you can
never use them as boxed (and they are not part of the
documentation as such).
|
|
|
|
|
|
|
|
|
|
| |
This shows up in the headers in FreeBSD's stdlib. Now I didn't add
anything to regress.h because I think that'd introduce an effective
hard dependency on a C11-capable compiler, unless we used #ifdef
trickery. But the problem with #ifdef is that the -expected.gir isn't
conditional.
https://bugzilla.gnome.org/show_bug.cgi?id=724851
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=724882
|
|
|
|
|
|
|
| |
Conform shlibs.py to the PEP8 standard. New additions were causing make
check to fail:
Fixed E211 whitespace before '('
Fixed E501 line too long (104 > 99 characters)
|
|
|
|
|
|
|
|
|
|
|
| |
If a xref points to a node that was not visited, because it
was not introspectable, don't assume it has no parent. Instead,
try to fetch the parent from the node directly.
This is still wrong (the xref points nowhere because no page is
generated), but it looks less wrong.
If OTOH a xref points to a different namespace, generate the
link directly, because yelp-build is not capable of translating
it.
|
|
|
|
| |
Make sure to set the parent of the function
|
|
|
|
|
| |
Switch enum from a topic to a guide page, and include links to
all static methods.
|
|
|
|
|
|
| |
As the comment says, it's an AST bug, the structure there cannot
be reasonably represented in gobject-introspection, and it makes
the tests for C and Python crash, so whatever.
|
|
|
|
|
|
|
|
|
|
|
| |
a final underscore
In cases like g_resources_register() and gdk_events_get_angle(),
the c_symbol_prefix of the first parameter (resp. g_resource and
gdk_event) is a prefix of the symbol, but the next character is
not _, so that should not be considered a method.
For backward compatibility reasons, we still generate one, but
then it's not included in the documentation (because of moved_to)
|
|
|
|
|
|
| |
Unless they have no methods, static methods and constructors
(because then they are useless)
Fixes GLib.BookmarkFile, GLib.PatternSpec and probably others.
|
|
|
|
|
|
|
|
|
|
| |
We should only look at introspectable constructors when resolving
the default and zero args. Also, a disguised structure or one
with zero fields can't be allocated directly.
In addition, restore availability of all constructors, because
we need a page to document the default one, and because some classes
have problems with GObject construction.
|
|
|
|
|
|
| |
Support for fundamental types was just merged in gjs, so just
filter out GParamSpec subclasses (because there is only one
class in gjs)
|
|
|
|
|
| |
If a function is shadowed, omit it from the documentation, and
if a function shadows, uses the new name.
|
|
|
|
|
| |
The ByteArray class is special in gjs, it's not a normal Array,
so make sure it's flagged as such.
|
|
|
|
| |
g-ir-compiler ignores them too, and they cause a crash, so whatever.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit f3fcdf97 introduced shlib resolution for Windows, but it only works
with MinGW and would therefore break builds of introspection files for
Visual C++.
Improve on the situation by adding capabilities to do the same with Visual
C++, as the introspection dumper program is still compiled and linked with
the Microsoft tool set (only the proprocessor to process the various
headers is using GCC/MinGW).
This makes use of the dumpbin utility that is shipped with Visual C++,
which will query a .lib file, which leads to the DLL that the .lib file
will link to. The 'gcc -print-search-dirs' can be replaced on Visual C++
builds by querying the LIB environment variable, as this is what the Visual
C++ compiler/linker really looks at during compilation and linkage.
https://bugzilla.gnome.org/show_bug.cgi?id=724890
|
|
|
|
|
|
|
|
|
| |
GI just adds '.dll' to library name and calls it a day. There's a
comment about how this function might work, i've used it to implement
something better. This requires a compiler that supports
-print-search-dirs argument (i.e. gcc) and a dlltool.
https://bugzilla.gnome.org/show_bug.cgi?id=724890
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=724887
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=724887
|
| |
|