| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
In g_irepository_get_object_gtype_interfaces(), returning the address of
the first GIBaseInfo* does not work reliably, because the GIBaseInfos
are not necessarily stored contiguously. So the second and subsequent
ones might be garbage.
Instead, return the address of the array of GIBaseInfo pointers.
Add a test that verifies the functionality, as well.
This is unfortunately an API and ABI break.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Meson unfortunately does not normalize the paths for us, so we couldn't
just rely on it to give us the correct target name without the full
target path when the path separator is not '/' (such as on Visual Studio
builds, where the path separator is '\\' (with escape character).
This means that, that on Visual Studio builds, targetname would be:
D:\\gi.build\\tests\\scanner\\Typedefs-1.0.gir
instead of:
Typedefs-1.0.gir
Since we have the targetbase variable which actually has the correct
info we need, use that to deduce the correct reference .gir file to
compare to.
|
|
|
|
|
|
|
|
|
|
| |
By doing so, we essentially cover the various compiler flags that we
want to use for non-Visual Studio builds to check for warnings that
might cause real concern.
This also skips the checks for the various GCC-isque CFlag checks that
are scattered in the various build files on Visual Studio builds, since
they are essentially meaningless on Visual Studio builds.
|
|
|
|
|
|
|
|
|
| |
os.path.commonpath() raises ValueError if the paths given to it are on different
drives.
Handle that case by giving up and add a test.
Reported here: https://github.com/msys2/MINGW-packages/pull/5258#issuecomment-485230864
|
| |
|
|
|
|
|
|
|
| |
In some cases we don't initialize all the struct fields of Regress
structs. We should either initialize them all, in the case of fields
that were added later; or mark that we don't intend to initialize them
all, by using C99 designated initializers.
|
|
|
|
|
|
|
| |
These files are exported for other projects to compile, so they should
compile with as few compiler warnings as possible. If GJS or PyGObject
has -Wunused-parameter turned on, then there should not be warnings in
these files.
|
|
|
|
| |
Less noisy build
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On macOS we ideally want to write the final absolute path of the library
into the gir and typelib. Up until now we inferred the install path from
the .la file in case we used libtool and through otool in case we weren't
using libtool hoping that the install_name was matching the install path.
meson currently sets the install_name of libraries to "@rpath/foo.dylib"
and adds rpaths to the executables in the build dir. Only during install does
it change the install_name to the absolute target path in all places.
Since we get called during build time we only get the @rpath from otool,
which then makes things fail at runtime since the executables don't have
the matching rpath set.
To make this somewhat work just fall back to the basename for relative
paths, so we dlopen "foo.dylib" and depend on things being in /usr/local/lib
or DYLD_FALLBACK_LIBRARY_PATH including the lib path (see man dlopen)
|
|
|
|
|
|
|
|
| |
Use call_count to verify the number of calls. This replaces
assert_called_once used previously, which is only available
since Python 3.6.
Fixes issue #274.
|
| |
|
|
|
|
|
|
| |
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.
|