| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
meson.build_root() is the root of the main project, better use
meson.current_build_dir() instead.
|
|
|
|
|
|
|
|
| |
Check that g_object_info_get_ref_function_pointer() actually returns something,
which it doesn't if the shared lib isn't found.
In case a shared lib isn't found g-i will emit a warning, so also make sure
we fail on warnings to avoid similar problems in the future.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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 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.
|
| |
|
|
|
|
|
|
|
|
|
| |
* This adds a new dependency on autoconf-archive.
* Pass WARN_CFLAGS/WARN_LDFLAGS/WARN_SCANNERFLAGS to everything we control the source of
* Disables all warning flags which make the build error out for now, we'll re-enable them
in followup commits.
* AX_COMPILER_FLAGS is used with the release flag always on so we don't get
-Werror by default.
|
|
|
|
| |
See #120.
|
|
|
|
|
|
|
|
| |
necessary"
This reverts commit 17ef691e9b3ebd475b01d1e623d3df7b1f534dfa.
This breaks builddir != srcdir builds, like GNOME Continuous.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=744021
|
|
|
|
|
|
|
|
| |
Adding "$(top_srcdir)/gir" to XDG_DATA_DIRS is pointless
as scanner/transformer.py actually goes looking for
"$(top_srcdir)/gir/gir-1.0", which doesn't exist.
https://bugzilla.gnome.org/show_bug.cgi?id=745636
|
|
|
|
|
|
|
|
|
|
|
| |
Generalize "throws" attribute to SignatureBlob which can be used by all
callable blob types. Keep FunctionBlob and VFuncBlob throw attributes
around and functional for compatibility. Refactor girwriter.c to write
out throws attribute for all callable types.
Based on a patch by Simon Feltman.
https://bugzilla.gnome.org/show_bug.cgi?id=729543
|
|
|
|
| |
Based on a patch by Simon Feltman.
|
|
|
|
|
|
|
|
|
|
|
| |
Add find_field utility function for finding a field info by name.
Beyond convenience, this should be faster than manually using
the get_n_fields and get_field functions because get_field does
an additional iteration for each field to calculate offsets O(n^2).
Thus find_field combines the offset and comparison
computations into a single loop O(n).
Based on a patch by Simon Feltman.
|
|
|
|
|
|
| |
Extends commit 92d9c38 to also pass CC to g-ir-scanner.
https://bugzilla.gnome.org/show_bug.cgi?id=700066
|
|
|
|
|
|
|
| |
unistd.h is not universally available, and dropping that include did not
seem to cause any warnings or errors, and did not affect the tests running.
https://bugzilla.gnome.org/show_bug.cgi?id=734640
|
|
|
|
|
|
|
|
|
|
|
| |
Knowing the ownership transfer for instance parameters is
necessary for correct memory management of functions which
"eat" their instance argument, such as g_dbus_method_invocation_return_*.
Parse this information from the gir file and store in the
typelib, and then provide new API on GICallableInfo to
retrieve this.
https://bugzilla.gnome.org/show_bug.cgi?id=729662
|
|
|
|
|
|
|
|
| |
Update tests/Makefile.am and tests/scanner/Makefile.am to use
EXTRA_LTLIBRARIES which minimizes the building of libraries to only
dependencies of specific tests when using: make check TESTS="..."
https://bugzilla.gnome.org/show_bug.cgi?id=720713
|
|
|
|
|
| |
This was achieved by running "indent -gnu -i2 -nut -l120" over C files which use a
different style, and manually fixing pointer declarations and modelines.
|
|
|
|
| |
By-product of https://bugzilla.gnome.org/show_bug.cgi?id=662241.
|
|
|
|
|
|
|
| |
gchar is signed, not unsigned. Add "guchar" alias as unsigned for completeness
(but usually it appears as guint8).
https://bugzilla.gnome.org/show_bug.cgi?id=691524
|
|
|
|
|
|
|
|
|
|
| |
The tests in tests/repository/ depend on libregress.so
from tests/scanner which cannot be loaded during make check.
Fixing this properly would require migrating to non-recursive
automake for the tests, but for now we can just work around
and set LD_LIBRARY_PATH (for linux) and PATH (for win32).
http://bugzilla.gnome.org/show_bug.cgi?id=675049
|
|
|
|
| |
And bump our GLib requirement.
|
|
|
|
|
|
|
|
|
| |
It appears that cmph library can return (n+1) when querying item not
present in its original n-item-sized set. Adjust code so that it
detects this condition and do not chase stray pointers resulting from
this bogus(?) hash result.
https://bugzilla.gnome.org/show_bug.cgi?id=675939
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix of leak in 4c9424e18d71237f438a99bc5f2d45ae7de60b78 was a bit
overaggressive, stealing also one reference from input 'info'
argument.
Also fixes another bug in that commit - local 'func' shadowing the
return value, causing that function always returned NULL even when
some result was actually found.
https://bugzilla.gnome.org/show_bug.cgi?id=673282
|
|
|
|
|
|
|
|
| |
This reverts commit e17c09749c23edbd928db19a8162484ddb6299b8.
We actually want the test for sizeof(GValue).
https://bugzilla.gnome.org/show_bug.cgi?id=660338
|
|
|
|
|
|
|
| |
It's redundant since we're already checking that it's equal to GValue,
and a problem is that padding may break exact assertions on the size.
https://bugzilla.gnome.org/show_bug.cgi?id=660338
|
|
|
|
|
|
|
| |
On some platform like armel or powerpc the compiler adds extra padding to
structs. Make the test_size_of_struct_with_array_of_anon_unions() check more
liberal by only requiring that the size of the struct is at least as big as
expected. Also use g_assert_cmpuint() to make it easier to see the actual diff.
|
|
|
|
|
|
| |
It was returning the wrong data.
https://bugzilla.gnome.org/show_bug.cgi?id=659749
|
|
|
|
| |
Fixes the test when running uninstalled.
|
|
|
|
|
|
|
|
|
| |
Algorithm which detects whether argument type is pointer checks for
trailing '*' characters in c:type .gir elements. This failed if ctype
is either 'gpointer' or 'gconstpointer'. Add specific check for
gpointer/gconstpointer types when deducing pointerness of the type.
https://bugzilla.gnome.org/show_bug.cgi?id=658848
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This applies mainly to GValue, which is defined as:
struct _GValue
{
/*< private >*/
GType g_type;
/* public for GTypeValueTable methods */
union {
gint v_int;
guint v_uint;
glong v_long;
gulong v_ulong;
gint64 v_int64;
guint64 v_uint64;
gfloat v_float;
gdouble v_double;
gpointer v_pointer;
} data[2];
};
Previously, the scanner did not understand the array of unions. This
resulted in g_struct_info_get_size returning an incorrect size for
GValue (at least on 32bit systems).
Fix this by making up a separate union declaration for the GIR that can
be referenced by the array.
https://bugzilla.gnome.org/show_bug.cgi?id=657040
|
|
|
|
|
| |
For gjs we want to switch to using introspection data for signals, and
the "notify" signal being missing from GObject was a problem.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use automake's check_ prefix and avoid putting anything nontrivial in
BUILT_SOURCES so that tests are build only on make check.
The dummy -rpath in AM_LDFLAGS in tests/scanner/Makefile.am is needed to
force libtool to build shared libraries for check_LTLIBRARIESS targets
(automake builds check_LTLIBRARIES as static by default); see
http://lists.gnu.org/archive/html/automake/2005-10/msg00107.html
https://bugzilla.gnome.org/show_bug.cgi?id=657066
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This uses the same backcompat machinery that was introduced for static
methods for non-class types, so this change does not break users of the
existing presentations.
New libgirepository API:
g_enum_info_get_n_methods
g_enum_info_get_method
https://bugzilla.gnome.org/show_bug.cgi?id=656499
|
|
|
|
|
|
|
|
| |
Add a method to look up a GIEnumInfo given its associated error quark.
Based on a patch from Colin Walters.
https://bugzilla.gnome.org/show_bug.cgi?id=602516
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Flags and enums with a GType have a value_nick and value_name
strings available in the class struct. But for flags and enums
without GType, we need to get this information from introspection.
g_base_info_get_name() gives the string for value_nick. In the GIR,
the attribute "c:identifier" is the string neede for value_name.
This patch adds the "c:identifier" from GIR to the typelib for all
flags and enum values. It can be retireved using
g_base_info_get_attribute(info, "c:identifier").
https://bugzilla.gnome.org/show_bug.cgi?id=642757
|
|
|
|
| |
With nonrecursive they're in $(top_builddir) now
|
| |
|
|
|
|
|
|
|
| |
This matches g_object_info_find_method, and allows us to add indexing
later.
https://bugzilla.gnome.org/show_bug.cgi?id=633204
|
|
|
|
|
| |
This is cleaner and faster, and prepares us better for an incoming
import of CMPH.
|
|
|
|
|
| |
Keep a typedef for backwards compatibility, until
the major bindings has moved over.
|
|
|
|
|
| |
Keep a typedef for backwards compatibility, until
the major bindings has moved over.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Broadly speaking, this change adds the concept of <vfunc> to the .gir.
The typelib already had most of the infrastructure for virtual functions,
though there is one API addition.
The scanner assumes that any class callback slot that doesn't match
a signal name is a virtual. In the .gir, we write out *both* the <method>
wrapper and a <vfunc>. If we can determine an association between
them (based on the names matching, or a new Virtual: annotation),
then we notate that in the .gir.
The typelib gains an association from the vfunc to the function, if
it exists. This will be useful for bindings since they already know
how to consume FunctionInfo.
|
|
|
|
|
|
|
|
| |
Similar to GObject class structs, we pair up GInterfaces with
their C structures.
Also, move some GLib-specific things into glibast.py, and make
the naming more generic.
|