| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Necessary as there is currently no Regress function to test whether functions can accept fundamental parameters.
|
|
|
|
|
|
| |
Breaks vapigen and changes GListModel definition in Gio-2.0.gir
This reverts commit a9f45431684e6be3623e272e54d481e4c5d9423d.
|
|
|
|
|
|
|
|
| |
GListModel is an interface for creating typed, list-like containers. The
data stored is GObject instances, but it's useful to be able to annotate
the actual type, for both documentation and code generation purposes.
The annotation should be optional, to maintain backward compatibility.
|
|
|
|
|
|
| |
This reverts commit b4c058bba4d95ae10e1e4238f9417fe954f97795.
See: #336
|
|
|
|
|
|
|
|
| |
GListModel is an interface for creating typed, list-like containers. The
data stored is GObject instances, but it's useful to be able to annotate
the actual type, for both documentation and code generation purposes.
Fixes: #328
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
C99 allows defining an array argument with a fixed size as:
void foo (int arr[static 10])
Compilers conforming to the C99 specification will be able to warn if
the function is called with NULL or with an array smaller than the
specified length, something that does not happen when using pre-C99
declarations like:
void foo (int arr[10])
As the declaration above is identical to:
void foo (int arr[])
Which is, in turn, identical to:
void foo (int *arr)
Fixes: #309
|
|
|
|
|
|
|
|
| |
This exercises the little-used code path where a signal is emitted with
a nullable GError as a parameter. It's modeled after
GstPbutils.Discoverer's 'discovered' signal.
See GNOME/gjs#262.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
This adds a property to RegressTestInterface which can be overridden, and
makes RegressTestSubObj implement it and override the property. This is
in order to catch the regressions in GJS around property access.
See gjs#193.
|
|
|
|
|
|
|
| |
GTK contains a few write-only properties, so it makes sense to have one
in the regress test suite.
See gjs!246
|
|
|
|
|
| |
It was added as part of !25 but without any implementation.
This made instantiating TestObject fail which we do in the pygobject test suite.
|
|
|
|
|
|
|
|
| |
Where it's easy add dummy args to match the cast; where the target is a subset just
prevent the warning with a cast to void*.
Provide a real copy function for the boxed type code in regress_foo.
This code is never executed afaics, but why not.
|
|
|
|
|
|
|
|
|
|
|
| |
Clear the string property of RegressTestObj prior to setting within
the property setter.
Make sure the linked list, hash table, and string properties are cleared
during destruction.
This fixes trivial memory leaks found with the PyGObject test suite.
https://bugzilla.gnome.org/show_bug.cgi?id=735013
Closes #113
|
|
|
|
|
|
|
|
| |
Cleanup which replaces manual loop implementation with API calls
when setting the linked list property.
https://bugzilla.gnome.org/show_bug.cgi?id=735013
Closes #113
|
|
|
|
|
| |
Float literal is silently promoted to a double here. Change it to a
double literal.
|
|
|
|
|
|
|
| |
This is modeled after GtkEditable::insert-text which isn't marshalled
properly in GJS.
See gjs#147.
|
|
|
|
|
|
|
| |
It includes a pointer parameter; for some reason, the pointer parameter
breaks g_object_info_find_signal() but a parameter-less signal doesn't.
See gjs#147.
|
| |
|
|
|
|
| |
Otherwise these will warn.
|
|
|
|
| |
This will otherwise warn.
|
|
|
|
|
| |
Compiling these gives warnings about const or non-const expressions. Fix
it by using the correct const-ness of types.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If type_specifier comes after type_qualifier, then GISourceType
representing type_specifier will be merely updated with qualifier
flags. On the other hand, when this order is reversed the type qualifier
used to be attached as a separate node through base_type (with
CTYPE_INVALID), and interpreted incorrectly in transformer code.
This commit changes this behaviour so that information about type
qualifiers is stored directly in GISourceType corresponding to type
specifier. It also fixes analogous issue with storage_class_specifier
and function_specifier.
From higher level viewpoint, it for example represents `const char*` and
`char const*` in equivalent manner after parsing, and addresses issue #79.
|
|
|
|
|
|
|
| |
Value assignments can happen at any point in the enumeration
declaration.
https://bugzilla.gnome.org/show_bug.cgi?id=629667
|
|
|
|
|
|
|
|
|
|
| |
This is something that libraries are not supposed to do, but some do
anyway (Soup and Clutter are two examples) and language bindings should
handle it somehow or other. In GJS we want to make sure that the way it's
handled doesn't change inadvertently, because buggy library code should
not break existing user code.
https://bugzilla.gnome.org/show_bug.cgi?id=785091
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=775679
|
|
|
|
|
|
|
| |
We could have a fundamental type A derived by a subclass B. Class A happens
to be introspected, but B isn't. This can cause some issues in Gjs.
https://bugzilla.gnome.org/show_bug.cgi?id=760056
|
|
|
|
|
|
|
|
| |
This is a regression test for marshalling callback arguments from signals
with an array parameter and separate length parameter into closures in
the introspected language.
https://bugzilla.gnome.org/show_bug.cgi?id=761659
|
|
|
|
|
|
|
| |
This is a regression test for returning out arrays of structs, like
gdk_keymap_get_entries_for_keyval() for example.
https://bugzilla.gnome.org/show_bug.cgi?id=761658
|
|
|
|
|
|
|
|
|
|
|
|
| |
On bug #719966, the question arose of whether parameters annotated with
(element-type) but not (not nullable) are regarded as nullable or
non-nullable.
Add some new unit tests to Regress-1.0.gir to check the behaviour is as
expected: annotating a parameter with (element-type) implicitly makes it
non-nullable (unless also annotated with (nullable)).
https://bugzilla.gnome.org/show_bug.cgi?id=757678
|
|
|
|
|
|
|
|
| |
Use a single static allocation for the hash created in regress_test_ghash_gvalue_return().
This function is explicitly marked as returning the hash with transfer-none
and doesn't need to re-create the hash each call.
https://bugzilla.gnome.org/show_bug.cgi?id=736517
|
|
|
|
|
|
| |
Transfer is annotated as full so the function should free its input.
https://bugzilla.gnome.org/show_bug.cgi?id=736517
|
|
|
|
|
|
|
| |
Transfer is annotated as full so the function should free its input
after testing and before output assignment.
https://bugzilla.gnome.org/show_bug.cgi?id=736517
|
|
|
|
|
|
|
|
| |
g_simple_async_result_complete_in_idle() will add its own reference for
managing the async result. We need to unref the result after calling this
so we don't leak.
https://bugzilla.gnome.org/show_bug.cgi?id=736517
|
|
|
|
|
|
|
|
|
|
| |
g-ir-scanner now supports something like this:
typedef void my_callback(int);
Notice how my_callback is not a pointer.
https://bugzilla.gnome.org/show_bug.cgi?id=755645
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gpointer parameters and return types should be marked as nullable by
default, unless:
• also annotated with (type) and not with (nullable); or
• explicitly annotated with (not nullable).
This introduces the (not nullable) annotation as a direct opposite to
(nullable). In future, (not) could be extended to invert other
annotations.
https://bugzilla.gnome.org/show_bug.cgi?id=729660
|
|
|
|
|
|
|
|
| |
The optional annotation was being applied which
is invalid for return values.
https://bugzilla.gnome.org/show_bug.cgi?id=752029
Signed-off-by: Garrett Regier <garrett.regier@riftio.com>
|
|
|
|
| |
More followup to https://bugzilla.gnome.org/show_bug.cgi?id=752047
|
|
|
|
| |
Related to: https://bugzilla.gnome.org/719966
|
|
|
|
|
|
| |
See https://bugzilla.gnome.org/show_bug.cgi?id=749696
https://bugzilla.gnome.org/show_bug.cgi?id=751978
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=751150
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=750286
|
|
|
|
|
|
|
| |
This is an installed file, so we can't assume that config.h
will be around.
https://bugzilla.gnome.org/show_bug.cgi?id=737275
|
|
|
|
|
|
|
|
|
| |
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 updates the test headers and sources to decorate the symbols with the
macro that can be used to export the symbols, and include config.h first in
the c-sources so that the macro can be defined with the compiler directive
to export the symbols. Update the CFLAGS as well so that the header that
defines the export decoration macro can be found.
https://bugzilla.gnome.org/show_bug.cgi?id=732669
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=702508
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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.
|