Use G_IS_VALUE for checking return values in closure marshaling

Replace return_value argument NULL checks in GClosureMarshal
implementations with G_IS_VALUE. This checks both NULL and
validity of the value (!= G_TYPE_INVALID). This is needed
because GLib can pass either NULL or an invalid value based
on whether or not G_ENABLE_DEBUG is set.
See: https://bugzilla.gnome.org/show_bug.cgi?id=707249

https://bugzilla.gnome.org/show_bug.cgi?id=707170
Change boxed type checking in marshaling to use __gtype__ attribute

Replace usage of pyg_boxed_check(pyboxed) with g_type_is_a and
pyg_type_from_object. This has the effect of using the __gtype__
attribute stashed on object class instead of the PyGBoxed
internally held gtype. This fixes type descrepencies for objects
marshaled into overridden signal class closures and passed back
to functions taking an alias their type.

https://bugzilla.gnome.org/show_bug.cgi?id=707140
Fix build on C89 Compilers

Avoid a variable declaration at the middle of the block

https://bugzilla.gnome.org/show_bug.cgi?id=707264
Fix GObject signal methods to work with new annotations

Add conditional support for signal methods annotated as gpointer
or GObject.Object. This is needed to work with newer versions of
glib which changed annotations to GObject.Object (bug #685387).

https://bugzilla.gnome.org/show_bug.cgi?id=707280
release 3.9.91
configure.ac: post-release bump to 3.9.92
Copy __doc__ when wrapping function

Signed-off-by: Vratislav Podzimek <vpodzime@redhat.com>
Signed-off-by: Martin Pitt <martinpitt@gnome.org>
Fix GLib.Source sub-classing with initializer args

Add variable args and keyword args to the GLib.Source.__new__
method to support sub-classes which want to implement __init__.

https://bugzilla.gnome.org/show_bug.cgi?id=707904
Fix union argument regression when marshaling from python

Check for union members when marshaling boxed types from Python.
This is a regression caused by stricter type checking added when
merging code from pygi-argument.c.
Re-add pyg_boxed_check to the same bit of code in addition to
__gtype__ checking to avoid a double regression.

https://bugzilla.gnome.org/show_bug.cgi?id=703873
Update current maintainers list in README
release 3.9.92
Fix test_gi.TestProjectVersion.test_version_str()

In this test case we only do a string comparison, not a proper "by version
component" numerical one. So relax the test to also work with 3.10.
release 3.10.0
configure.ac: post-release bump to 3.10.1
configure.ac: bump trunk to 3.11.1
Remove support for allowing PyObjects as void pointers

Final removal of marshaling Python object addresses as
void pointers. This ensures we can successfully pass
integer values as the pointer without the Python object
leaking or crashing due to invalid memory.

https://bugzilla.gnome.org/show_bug.cgi?id=688081
cache refactoring: Add comments to callable cache structure

Add comments to count fields on _PyGICallableCache.

https://bugzilla.gnome.org/show_bug.cgi?id=640812
cache refactoring: Move PyGI direction code into new function

https://bugzilla.gnome.org/show_bug.cgi?id=640812
cache refactoring: Use GPtrArray for callable arg cache

Replace manual management of the C array holding individual
argument caches with usage of GPtrArray. This provides storage
of the array length along with item memory management.

https://bugzilla.gnome.org/show_bug.cgi?id=640812
cache refactoring: Remove special case marshaling for instance arguments

Remove duplicate code for marshaling struct and objects for
instance arguments. Re-use individual cache marshalers for
structs and objects with the instance argument. This required
removal of passing GITypeInfo to the marshaler because it is
not available for instance arguments. Instead always assume
"is_pointer" for the instance argument by using the cache.

https://bugzilla.gnome.org/show_bug.cgi?id=640812