| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This reverts commit f606183a010fbec4382acb728882cc0eddbaf7f7.
See https://gitlab.gnome.org/GNOME/gobject-introspection/merge_requests/9#note_409979
|
|
|
|
| |
This makes the scanner consistent with the docs.
|
|
|
|
|
|
|
|
|
|
|
|
| |
They contain things like -fvisibility=hidden which, in case of building with
CFLAGS="-flto -O2" LDFLAGS="-Wl,--as-needed -flto", results in the linker
throwing out unused symbols and not linking the dumper against libregress.
This results in errors like:
Invalid GType function: 'regress_test_enum_get_type'
Failed to find symbol 'regress_test_enum_get_type'
Fix this by only passing the required CFLAGS to the scanner instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> Certain types like GIConv and GdkAtom are pointers internally but don't
> look like pointers when referenced. They have the form.
>
> typedef struct _X *X;
>
> Parse these as structures/records but mark them in the gir with a 'disguised'
> attribute so that we know that they need special handling.
Additionally, stop relaying on disguised attribute when deciding whether
to render a page. Check number of fields instead, so as to avoid
introducing large regression in the docs.
Fixes #101.
|
|
|
|
|
|
|
|
| |
Instead of allowing each error level to be enabled just enable all of them
through the enable_warnings() method. This matches what the code is currently
doing (minus that one helper script) and simplifies things.
Also remove the error count, it's not used.
|
|
|
|
|
|
|
|
|
|
| |
The scanner matches gtk-doc sections which match the lower case type name
to the type and uses that for the type documentation. The only problem is
it only takes the docs and none of the other annotations like deprecation
info etc.
This changes things to also parse the annotations in that case and adds some
tests while at it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Relatively common in practice are:
* output with transfer full, which is already covered by
`regress_test_array_struct_out`,
* input with transfer none, covered by a new
`regress_test_array_struct_in_none`
Other variants are quite esoteric, but it still might be useful to
include them so that bindings can verify that they are handled
gracefully, e.g., by reporting an error instead of crashing.
Issue #90
|
|
|
|
|
| |
To make it easier to test make sure it always returns absolute paths.
Also fix a typo, oops!
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provide partial support for multi-dimensional arrays by representing
them as flattened one dimensional array with size that is equal to
product of sizes in each dimension. Previously only the first dimension
would be actually used.
This should be sufficient to ensure that those fields have layout
compatible with C, without using nested array types that are currently
unsupported by vapigen
Issue #255.
|
|
|
|
|
|
|
|
| |
This also reverts workaround introduced to support this use case in
f77cfc4275b1fba4f9fedea6e40b00e0ebbe142c, since it is no longer
necessary.
Fixes issue #141.
|
|
|
|
|
|
|
|
|
|
| |
Neither `_create_source_type` nor `_create_complete_source_type`
actually support fixed size arrays, so previously generated C types were
incorrect.
Remove C types from array fields instead of producing incorrect ones.
Fixes issue #145.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This is necessary to parse types like `unsigned char` or `long double`,
and is already done when parsing `declarations_specifiers`. Examples
that are fixed by this change include:
* `GLib.TestLogMsg.nums` previously parsed as `long` but should be `long
double`.
* `GMime.Encoding.uubuf` previously parsed as `unsigned` but should be
`unsigned char`.
|
| |
|
| |
|
|
|
|
| |
This time pass the libgirepository build dir
|
|
|
|
|
|
|
| |
These functions were removed a long time ago in commit af7be95a. Being
present in the header file means they are present in the generated GIR
file, but trying to resolve them with dlsym will fail and crash the
program.
|
| |
|
|
|
|
|
| |
meson doesn't set PATH for the test dependencies so we have to do it manually.
Also make sure the test depends on the test binary.
|
|
|
|
|
|
|
| |
G_GSIZE_FORMAT should only be used with glib functions and G_STRUCT_OFFSET()
returns glong not gsize.
This fixes various compiler warnings on Windows.
|
|
|
|
| |
I added it to the wrong one in d2bd6390ed8, oops..
|
|
|
|
|
| |
It broke continuous
https://build.gnome.org/continuous/buildmaster/builds/2019/01/01/0/build/log-gobject-introspection.txt
|
| |
|
| |
|
|
|
|
|
| |
The cairo dependency fallback code is copied from pygobject. I assume that
will work for msvc users (cairo is disabled by default anyway)
|
| |
|
|
|
|
|
|
|
|
| |
Otherwise when you set CC=clang then distuils will still use gcc for linking.
While it seems we don't invoke the link command atm this shouldn't hurt.
The upstream customize_compiler() does the same thing on macOS and there is a bug
for enabling it everywhere: https://bugs.python.org/issue24935
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Only use flags provided by env vars from the user and never from the
Python sysconfig. The sysconfig values depend on the way Python was built,
might conflict when using g-i with a different compiler and can't be controlled
by the g-i user.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
No functional changes intended.
Tests check that:
* Compiler is obtained from CC.
* cc is used as the default compiler.
Currently not true as a Python build time compiler is used as the default.
* Preprocessor is obtained from CC when CPP is unspecified by adding -E.
* Preprocessor is obtained from CPP.
* cpp is used as the default preprocessor.
Currently not true as Python build time preprocessor is used as the default.
* Shell word splitting rules are used to split CC.
* Shell word splitting rules are used to split CPP.
* Deprecation warnings are disabled during compilation.
* Preprocessing step includes CPPFLAGS.
* Compilation step includes both CFLAGS and CPPFLAGS, in that order.
* Macros from CFLAGS are defined only once.
Currently not true as they are defined twice.
* Flags that would retain macros after preprocessing step are filtered out.
Currently only partially true as they aren't filtered out from CPPFLAGS.
* Preprocessing step includes flag that preserves comments.
* Preprocessing step includes current working directory.
* Complete preprocessing command doesn't contain anything unexpected.
Currently not true as Python build time CPPFLAGS are included as well.
* Complete build command doesn't contain anything unexpected.
Currently not true as Python build time CFLAGS and CPPFLAGS are included as well.
|
| |
|
|
|
|
|
|
|
|
|
| |
With !45 special casing of bool in the lexer was removed which previously allowed the usage of
bool without including stdbool.h. This breaks scanning of graphene headers
which guarded the stdbool include with __GI_SCANNER__ (I haven't figured out why).
Add back the special handling for bool in the lexer and also map it to gboolean like
_Bool as if stdbool.h was included.
|
|
|
|
|
|
|
|
| |
Manually add all the subproject build directories to PATH for running
the scanner tests.
I'm wondering if meson shouldn't do this for us based on the dependency
we pass to test(), but this will do for now.
|
| |
|
|
|
|
|
|
|
|
| |
Generating offsets test makes them quite hard to understand. The fact
that they parse C code with custom regular expressions don't help
either.
Replace offsets test with their generated form.
|
|
|
|
| |
So we don't ignore any PYTHONPATH set by the user.
|
|
|
|
|
|
|
|
| |
This enables various compiler warnings project wide and disables the triggered
ones for each library/executable. This should give us roughly the same behaviour
as with autotools.
Tested with gcc8 and clang7.
|
|
|
|
|
|
| |
This requires a code change in codegen.py to support the case whre output files
are not installed in the working directory. Instead of using the output
path for the header include use the relative path to the output source file.
|
|
|
|
| |
Not sure if they are used, but we should try to do the same thing as autotools for starters
|
|
|
|
|
| |
Add a simple test using the docwriter so we trigger the docwriter related
Python imports.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the following macros and functions: GI_MAJOR_VERSION, GI_MICRO_VERSION,
GI_MINOR_VERSION, GI_CHECK_VERSION, gi_get_major_version,gi_get_micro_version,
gi_get_minor_version.
Since we share a prefix with glib we have to namespace these by using the gi_
prefix. g_gi would also work but we already export symbols with gi_ like
gi_cclosure_marshal_generic(), gi_type_tag_get_ffi_type() and
gi_type_info_extract_ffi_return_value(), so let's not add another naming scheme.
|
|
|
|
|
|
|
|
|
|
| |
Fixes #96
GITypeInfo is a GIBaseInfo so calling g_base_info_get_name() on it should do something
sensible.
g_base_info_get_name() has always been documented to return NULL in case no name
is available so return that instead.
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| | |
meson: Run annotationparser tests
See merge request GNOME/gobject-introspection!92
|