Imported Upstream version 3.21.92 93/138293/1
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 11 Jul 2017 23:45:53 +0000 (08:45 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 11 Jul 2017 23:45:57 +0000 (08:45 +0900)
Change-Id: I82aba60917e0d0f191abfa37f1162e93981f165d
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
24 files changed:
ChangeLog
Makefile.in
NEWS
PKG-INFO
aclocal.m4
configure
configure.ac
examples/Makefile.in
gi/Makefile.in
gi/_gobject/Makefile.in
gi/overrides/GLib.py
gi/overrides/Makefile.in
gi/pygi-argument.c
gi/pygi-argument.h
gi/pygi-basictype.c
gi/pygi-hashtable.c
gi/pygi-list.c
gi/repository/Makefile.in
pygtkcompat/Makefile.in
tests/Makefile.am
tests/Makefile.in
tests/gimarshallingtestsextra.c
tests/gimarshallingtestsextra.h
tests/test_gi.py

index 92fedb2..d03dfe9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,125 @@
+commit 7ccc164b6da6d87c0a200ea50314d213470a1f18
+Author: Christoph Reiter <creiter@src.gnome.org>
+Date:   Sat Sep 3 20:02:13 2016 +0200
+
+    Handle nullable filename parameters
+
+    Make _pygi_marshal_from_py_filename handle None input
+    values. This allows one to pass None to parameters
+    annotated as nullable filenames.
+
+    This fixes a test suite error in test_spawn_async_with_pipes
+    triggered by an annotation change in glib.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=770821
+
+ gi/pygi-basictype.c             |  5 +++++
+ tests/gimarshallingtestsextra.c | 22 ++++++++++++++++++++++
+ tests/gimarshallingtestsextra.h |  3 +++
+ tests/test_gi.py                |  4 ++++
+ 4 files changed, 34 insertions(+)
+
+commit f4d858c069f06e7060a0bb067c29f5bffb7869ee
+Author: Aurelien Jarno <aurelien@aurel32.net>
+Date:   Wed Aug 31 22:16:06 2016 +0200
+
+    Fix list/hashtable enum <-> hash conversion on 64-bit big endian
+
+    glist and ghashtable objects both store pointers. Complex objects are
+    stored as pointers to the objects, but simpler objects like an integer
+    value are stored directly as a pointer, using for example the
+    GINT_TO_POINTER and GPOINTER_TO_INT macros.
+
+    This is done in pygobject with the _pygi_hash_pointer_to_arg and
+    _pygi_arg_to_hash_pointer functions. These functions handle the
+    various
+    type of objects. However they consider that an enum, represented
+    with the
+    GI_TYPE_TAG_INTERFACE type (extended interface object), are always a
+    pointer. This is wrong as it is often a 32-bit value. Therefore
+    on 64-bit
+    big endian machines, the value is handle with the 2 32-bit parts
+    swapped.
+
+    This patches fixes that by changing the second argument of both
+    functions
+    from GITypeTag to GITypeInfo. This way the interface can be
+    determined,
+    and the underlying storage type can also be determined. This currently
+    only handles enum and flags, leaving other types as pointers. The
+    patch
+    also adds two tests in the testsuite, one for each direction.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=770608
+
+ gi/pygi-argument.c              | 33 +++++++++++++++++++++++++++++----
+ gi/pygi-argument.h              |  4 ++--
+ gi/pygi-hashtable.c             |  8 ++++----
+ gi/pygi-list.c                  |  8 ++++----
+ tests/gimarshallingtestsextra.c | 33 +++++++++++++++++++++++++++++++++
+ tests/gimarshallingtestsextra.h | 10 ++++++++++
+ tests/test_gi.py                | 11 +++++++++++
+ 7 files changed, 93 insertions(+), 14 deletions(-)
+
+commit 1cb6c470e9d297afda21b73efaccb0b95e519b5d
+Author: Lukas K <lu@0x83.eu>
+Date:   Fri May 13 21:30:47 2016 +0200
+
+    Allow passing sockets to io_add_watch on win32
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=766396
+
+ gi/overrides/GLib.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit 4617c39ca212f0da82af1a9989c912bcdfe1158b
+Author: Michael Biebl <biebl@debian.org>
+Date:   Sat Sep 3 16:46:40 2016 +0200
+
+    tests: use dbus-run-session instead of dbus-launch to run tests
+
+    The use of dbus-launch is deprecated by dbus upstream.
+    See https://lists.debian.org/debian-devel/2016/08/msg00554.html
+    for more
+    details.
+
+    So use dbus-run-session instead, which was specifically designed to be
+    used for such cases, like running test-suites.
+
+    See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836049.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=770798
+
+ tests/Makefile.am | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+commit 4b9185250d73c38231d90b53974d0d2912a02972
+Author: Christoph Reiter <creiter@src.gnome.org>
+Date:   Thu Aug 25 16:57:11 2016 +0200
+
+    configure.ac: post-release version bump to 3.21.92
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 2f98ecc4df9e0feaab78ba289956f469e36c7d76
+Author: Christoph Reiter <creiter@src.gnome.org>
+Date:   Thu Aug 25 16:51:39 2016 +0200
+
+    release 3.21.91
+
+ NEWS | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+commit 91abec259ed0c387ab69762ff92142b08327d00a
+Author: Christoph Reiter <creiter@src.gnome.org>
+Date:   Thu Aug 25 16:50:56 2016 +0200
+
+    configure.ac: version bump to 3.21.91
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
 commit f65bb1fc8f7f6172970545412fe56ab75f57904b
 Author: Mathieu Bridon <bochecha@daitauha.fr>
 Date:   Thu Jun 23 22:35:42 2016 +0200
index 2353779..9e3a948 100644 (file)
@@ -264,6 +264,8 @@ CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@
+CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@
+CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@
 CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@
 CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@
 CPP = @CPP@
diff --git a/NEWS b/NEWS
index abbb672..59be916 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,10 @@
+3.21.92 11-Sep-2016
+        - Handle nullable filename parameters (Christoph Reiter) (#770821)
+        - Fix list/hashtable enum <-> hash conversion on 64-bit big endian (Aurelien Jarno) (#770608)
+        - Allow passing sockets to io_add_watch on win32 (Lukas K) (#766396)
+        - tests: use dbus-run-session instead of dbus-launch to run tests (Michael Biebl) (#770798)
+        - configure.ac: post-release version bump to 3.21.92 (Christoph Reiter)
+
 3.21.91 25-Aug-2016
         - Allow installing with pip (Mathieu Bridon) (#767988)
         - Skip a test with older glib (Christoph Reiter) (#740301)
index 38a3d8a..00544b6 100644 (file)
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: PyGObject
-Version: 3.21.91
+Version: 3.21.92
 Summary: Python bindings for GObject
 Home-page: http://www.pygtk.org/
 Author: James Henstridge
@@ -8,7 +8,7 @@ Author-email: james@daa.com.au
 Maintainer: Simon Feltman
 Maintainer-email: sfeltman@src.gnome.org
 License: GNU LGPL
-Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/3.21/pygobject-3.21.91.tar.gz
+Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/3.21/pygobject-3.21.92.tar.gz
 Description: Python bindings for GLib and GObject
 Platform: POSIX, Windows
 Classifier: Development Status :: 5 - Production/Stable
index 3241747..a9612de 100644 (file)
@@ -30,14 +30,15 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
 #
 # DESCRIPTION
 #
-#   Defines CODE_COVERAGE_CFLAGS and CODE_COVERAGE_LDFLAGS which should be
-#   included in the CFLAGS and LIBS/LDFLAGS variables of every build target
-#   (program or library) which should be built with code coverage support.
-#   Also defines CODE_COVERAGE_RULES which should be substituted in your
-#   Makefile; and $enable_code_coverage which can be used in subsequent
-#   configure output. CODE_COVERAGE_ENABLED is defined and substituted, and
-#   corresponds to the value of the --enable-code-coverage option, which
-#   defaults to being disabled.
+#   Defines CODE_COVERAGE_CPPFLAGS, CODE_COVERAGE_CFLAGS,
+#   CODE_COVERAGE_CXXFLAGS and CODE_COVERAGE_LDFLAGS which should be
+#   included in the CPPFLAGS, CFLAGS CXXFLAGS and LIBS/LDFLAGS variables of
+#   every build target (program or library) which should be built with code
+#   coverage support. Also defines CODE_COVERAGE_RULES which should be
+#   substituted in your Makefile; and $enable_code_coverage which can be
+#   used in subsequent configure output. CODE_COVERAGE_ENABLED is defined
+#   and substituted, and corresponds to the value of the
+#   --enable-code-coverage option, which defaults to being disabled.
 #
 #   Test also for gcov program and create GCOV variable that could be
 #   substituted.
@@ -55,7 +56,9 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
 #
 #     @CODE_COVERAGE_RULES@
 #     my_program_LIBS = ... $(CODE_COVERAGE_LDFLAGS) ...
+#     my_program_CPPFLAGS = ... $(CODE_COVERAGE_CPPFLAGS) ...
 #     my_program_CFLAGS = ... $(CODE_COVERAGE_CFLAGS) ...
+#     my_program_CXXFLAGS = ... $(CODE_COVERAGE_CXXFLAGS) ...
 #
 #   This results in a "check-code-coverage" rule being added to any
 #   Makefile.am which includes "@CODE_COVERAGE_RULES@" (assuming the module
@@ -69,7 +72,7 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
 #
 # LICENSE
 #
-#   Copyright (c) 2012 Philip Withnall
+#   Copyright (c) 2012, 2016 Philip Withnall
 #   Copyright (c) 2012 Xan Lopez
 #   Copyright (c) 2012 Christian Persch
 #   Copyright (c) 2012 Paolo Borelli
@@ -89,7 +92,7 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
 #   You should have received a copy of the GNU Lesser General Public License
 #   along with this program. If not, see <http://www.gnu.org/licenses/>.
 
-#serial 5
+#serial 15
 
 AC_DEFUN([AX_CODE_COVERAGE],[
        dnl Check for --enable-code-coverage
@@ -126,7 +129,7 @@ AC_DEFUN([AX_CODE_COVERAGE],[
                ])
 
                # List of supported lcov versions.
-               lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11"
+               lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11 1.12"
 
                AC_CHECK_PROG([LCOV], [lcov], [lcov])
                AC_CHECK_PROG([GENHTML], [genhtml], [genhtml])
@@ -159,18 +162,23 @@ AC_DEFUN([AX_CODE_COVERAGE],[
                ])
 
                dnl Build the code coverage flags
+               CODE_COVERAGE_CPPFLAGS="-DNDEBUG"
                CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
+               CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
                CODE_COVERAGE_LDFLAGS="-lgcov"
 
+               AC_SUBST([CODE_COVERAGE_CPPFLAGS])
                AC_SUBST([CODE_COVERAGE_CFLAGS])
+               AC_SUBST([CODE_COVERAGE_CXXFLAGS])
                AC_SUBST([CODE_COVERAGE_LDFLAGS])
        ])
 
-CODE_COVERAGE_RULES='
+[CODE_COVERAGE_RULES='
 # Code coverage
 #
 # Optional:
 #  - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting.
+#    Multiple directories may be specified, separated by whitespace.
 #    (Default: $(top_builddir))
 #  - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated
 #    by lcov for code coverage. (Default:
@@ -178,13 +186,26 @@ CODE_COVERAGE_RULES='
 #  - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage
 #    reports to be created. (Default:
 #    $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage)
+#  - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage,
+#    set to 0 to disable it and leave empty to stay with the default.
+#    (Default: empty)
+#  - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov
+#    instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE)
+#  - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov
+#    instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT)
 #  - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov
-#  - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the lcov instance.
-#    (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH)
-#  - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the lcov instance.
-#    (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)
+#  - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the
+#    collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH)
+#  - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov
+#    instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)
+#  - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering
+#    lcov instance. (Default: empty)
+#  - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov
+#    instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT)
+#  - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the
+#    genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE)
 #  - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml
-#    instance. (Default: empty)
+#    instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT)
 #  - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore
 #
 # The generated report will be titled using the $(PACKAGE_NAME) and
@@ -195,21 +216,44 @@ CODE_COVERAGE_RULES='
 CODE_COVERAGE_DIRECTORY ?= $(top_builddir)
 CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info
 CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage
+CODE_COVERAGE_BRANCH_COVERAGE ?=
+CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\
+--rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE))
+CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT)
 CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)"
 CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH)
 CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)
-CODE_COVERAGE_GENHTML_OPTIONS ?=
+CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?=
+CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT)
+CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\
+$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\
+--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE))
+CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULTS)
 CODE_COVERAGE_IGNORE_PATTERN ?=
 
+code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V))
+code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY))
+code_coverage_v_lcov_cap_0 = @echo "  LCOV   --capture"\
+ $(CODE_COVERAGE_OUTPUT_FILE);
+code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V))
+code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY))
+code_coverage_v_lcov_ign_0 = @echo "  LCOV   --remove /tmp/*"\
+ $(CODE_COVERAGE_IGNORE_PATTERN);
+code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V))
+code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY))
+code_coverage_v_genhtml_0 = @echo "  GEN   " $(CODE_COVERAGE_OUTPUT_DIRECTORY);
 code_coverage_quiet = $(code_coverage_quiet_$(V))
 code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY))
 code_coverage_quiet_0 = --quiet
 
+# sanitizes the test-name: replaces with underscores: dashes and dots
+code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1)))
+
 # Use recursive makes in order to ignore errors during check
 check-code-coverage:
 ifeq ($(CODE_COVERAGE_ENABLED),yes)
-       -$(MAKE) $(AM_MAKEFLAGS) -k check
-       $(MAKE) $(AM_MAKEFLAGS) code-coverage-capture
+       -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check
+       $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture
 else
        @echo "Need to reconfigure with --enable-code-coverage"
 endif
@@ -217,10 +261,10 @@ endif
 # Capture code coverage data
 code-coverage-capture: code-coverage-capture-hook
 ifeq ($(CODE_COVERAGE_ENABLED),yes)
-       $(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_OPTIONS)
-       $(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)"
+       $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS)
+       $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS)
        -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp
-       LANG=C $(GENHTML) $(code_coverage_quiet) --prefix $(CODE_COVERAGE_DIRECTORY) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS)
+       $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS)
        @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html"
 else
        @echo "Need to reconfigure with --enable-code-coverage"
@@ -240,11 +284,11 @@ endif
 GITIGNOREFILES ?=
 GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
 
-DISTCHECK_CONFIGURE_FLAGS ?=
-DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage
+A''M_DISTCHECK_CONFIGURE_FLAGS ?=
+A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage
 
 .PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean
-'
+']
 
        AC_SUBST([CODE_COVERAGE_RULES])
        m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([CODE_COVERAGE_RULES])])
index d8aaf58..85e5c5c 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for pygobject 3.21.91.
+# Generated by GNU Autoconf 2.69 for pygobject 3.21.92.
 #
 # Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject>.
 #
@@ -591,8 +591,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='pygobject'
 PACKAGE_TARNAME='pygobject'
-PACKAGE_VERSION='3.21.91'
-PACKAGE_STRING='pygobject 3.21.91'
+PACKAGE_VERSION='3.21.92'
+PACKAGE_STRING='pygobject 3.21.92'
 PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject'
 PACKAGE_URL='https://wiki.gnome.org/Projects/PyGObject/'
 
@@ -640,7 +640,9 @@ LIBOBJS
 GNOME_CODE_COVERAGE_RULES
 CODE_COVERAGE_RULES
 CODE_COVERAGE_LDFLAGS
+CODE_COVERAGE_CXXFLAGS
 CODE_COVERAGE_CFLAGS
+CODE_COVERAGE_CPPFLAGS
 GENHTML
 LCOV
 GCOV
@@ -1411,7 +1413,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures pygobject 3.21.91 to adapt to many kinds of systems.
+\`configure' configures pygobject 3.21.92 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1482,7 +1484,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of pygobject 3.21.91:";;
+     short | recursive ) echo "Configuration of pygobject 3.21.92:";;
    esac
   cat <<\_ACEOF
 
@@ -1626,7 +1628,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-pygobject configure 3.21.91
+pygobject configure 3.21.92
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1904,7 +1906,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by pygobject $as_me 3.21.91, which was
+It was created by pygobject $as_me 3.21.92, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2268,9 +2270,9 @@ $as_echo "#define PYGOBJECT_MINOR_VERSION 21" >>confdefs.h
 PYGOBJECT_MINOR_VERSION=21
 
 
-$as_echo "#define PYGOBJECT_MICRO_VERSION 91" >>confdefs.h
+$as_echo "#define PYGOBJECT_MICRO_VERSION 92" >>confdefs.h
 
-PYGOBJECT_MICRO_VERSION=91
+PYGOBJECT_MICRO_VERSION=92
 
 
 ac_config_headers="$ac_config_headers config.h"
@@ -2792,7 +2794,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='pygobject'
- VERSION='3.21.91'
+ VERSION='3.21.92'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -15100,7 +15102,7 @@ fi
 fi
 
                # List of supported lcov versions.
-               lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11"
+               lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11 1.12"
 
                # Extract the first word of "lcov", so it can be a program name with args.
 set dummy lcov; ac_word=$2
 
 fi
 
-                               CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
+                               CODE_COVERAGE_CPPFLAGS="-DNDEBUG"
+               CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
+               CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
                CODE_COVERAGE_LDFLAGS="-lgcov"
 
 
 
 
+
+
 fi
 
 CODE_COVERAGE_RULES='
@@ -15231,6 +15237,7 @@ CODE_COVERAGE_RULES='
 #
 # Optional:
 #  - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting.
+#    Multiple directories may be specified, separated by whitespace.
 #    (Default: $(top_builddir))
 #  - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated
 #    by lcov for code coverage. (Default:
@@ -15238,13 +15245,26 @@ CODE_COVERAGE_RULES='
 #  - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage
 #    reports to be created. (Default:
 #    $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage)
+#  - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage,
+#    set to 0 to disable it and leave empty to stay with the default.
+#    (Default: empty)
+#  - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov
+#    instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE)
+#  - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov
+#    instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT)
 #  - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov
-#  - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the lcov instance.
-#    (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH)
-#  - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the lcov instance.
-#    (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)
+#  - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the
+#    collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH)
+#  - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov
+#    instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)
+#  - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering
+#    lcov instance. (Default: empty)
+#  - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov
+#    instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT)
+#  - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the
+#    genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE)
 #  - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml
-#    instance. (Default: empty)
+#    instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT)
 #  - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore
 #
 # The generated report will be titled using the $(PACKAGE_NAME) and
@@ -15255,21 +15275,44 @@ CODE_COVERAGE_RULES='
 CODE_COVERAGE_DIRECTORY ?= $(top_builddir)
 CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info
 CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage
+CODE_COVERAGE_BRANCH_COVERAGE ?=
+CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\
+--rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE))
+CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT)
 CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)"
 CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH)
 CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)
-CODE_COVERAGE_GENHTML_OPTIONS ?=
+CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?=
+CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT)
+CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\
+$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\
+--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE))
+CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULTS)
 CODE_COVERAGE_IGNORE_PATTERN ?=
 
+code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V))
+code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY))
+code_coverage_v_lcov_cap_0 = @echo "  LCOV   --capture"\
+ $(CODE_COVERAGE_OUTPUT_FILE);
+code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V))
+code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY))
+code_coverage_v_lcov_ign_0 = @echo "  LCOV   --remove /tmp/*"\
+ $(CODE_COVERAGE_IGNORE_PATTERN);
+code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V))
+code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY))
+code_coverage_v_genhtml_0 = @echo "  GEN   " $(CODE_COVERAGE_OUTPUT_DIRECTORY);
 code_coverage_quiet = $(code_coverage_quiet_$(V))
 code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY))
 code_coverage_quiet_0 = --quiet
 
+# sanitizes the test-name: replaces with underscores: dashes and dots
+code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1)))
+
 # Use recursive makes in order to ignore errors during check
 check-code-coverage:
 ifeq ($(CODE_COVERAGE_ENABLED),yes)
-       -$(MAKE) $(AM_MAKEFLAGS) -k check
-       $(MAKE) $(AM_MAKEFLAGS) code-coverage-capture
+       -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check
+       $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture
 else
        @echo "Need to reconfigure with --enable-code-coverage"
 endif
@@ -15277,10 +15320,10 @@ endif
 # Capture code coverage data
 code-coverage-capture: code-coverage-capture-hook
 ifeq ($(CODE_COVERAGE_ENABLED),yes)
-       $(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_OPTIONS)
-       $(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)"
+       $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS)
+       $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS)
        -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp
-       LANG=C $(GENHTML) $(code_coverage_quiet) --prefix $(CODE_COVERAGE_DIRECTORY) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS)
+       $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS)
        @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html"
 else
        @echo "Need to reconfigure with --enable-code-coverage"
@@ -15300,8 +15343,8 @@ endif
 GITIGNOREFILES ?=
 GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
 
-DISTCHECK_CONFIGURE_FLAGS ?=
-DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage
+A''M_DISTCHECK_CONFIGURE_FLAGS ?=
+A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage
 
 .PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean
 '
@@ -16005,7 +16048,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by pygobject $as_me 3.21.91, which was
+This file was extended by pygobject $as_me 3.21.92, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -16072,7 +16115,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-pygobject config.status 3.21.91
+pygobject config.status 3.21.92
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index 0bed67f..52668ad 100644 (file)
@@ -18,7 +18,7 @@ m4_define(python3_min_ver, 3.1)
 dnl the pygobject version number
 m4_define(pygobject_major_version, 3)
 m4_define(pygobject_minor_version, 21)
-m4_define(pygobject_micro_version, 91)
+m4_define(pygobject_micro_version, 92)
 m4_define(pygobject_version, pygobject_major_version.pygobject_minor_version.pygobject_micro_version)
 
 dnl versions of packages we require ...
index 3e74ec7..1cec31f 100644 (file)
@@ -139,6 +139,8 @@ CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@
+CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@
+CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@
 CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@
 CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@
 CPP = @CPP@
index 805a6d3..934b1c9 100644 (file)
@@ -299,6 +299,8 @@ CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@
+CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@
+CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@
 CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@
 CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@
 CPP = @CPP@
index c49b614..e7e9e78 100644 (file)
@@ -172,6 +172,8 @@ CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@
+CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@
+CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@
 CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@
 CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@
 CPP = @CPP@
index c12b4d8..5a7792d 100644 (file)
@@ -22,6 +22,7 @@
 import signal
 import warnings
 import sys
+import socket
 
 from ..module import get_introspection_module
 from .._gi import (variant_type_from_string, source_new,
@@ -726,6 +727,9 @@ def _io_add_watch_get_args(channel, priority_, condition, *cb_and_user_data, **k
     if isinstance(channel, int):
         func_fdtransform = lambda _, cond, *data: callback(channel, cond, *data)
         real_channel = GLib.IOChannel.unix_new(channel)
+    elif isinstance(channel, socket.socket) and sys.platform == 'win32':
+        func_fdtransform = lambda _, cond, *data: callback(channel, cond, *data)
+        real_channel = GLib.IOChannel.win32_new_socket(channel.fileno())
     elif hasattr(channel, 'fileno'):
         # backwards compatibility: Allow calling with Python file
         func_fdtransform = lambda _, cond, *data: callback(channel, cond, *data)
index da8e432..11813bc 100644 (file)
@@ -172,6 +172,8 @@ CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@
+CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@
+CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@
 CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@
 CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@
 CPP = @CPP@
index e9bfe3b..0929038 100644 (file)
@@ -85,10 +85,33 @@ pygi_argument_to_gssize (GIArgument *arg_in,
     }
 }
 
+static GITypeTag
+_pygi_get_storage_type (GITypeInfo *type_info)
+{
+    GITypeTag type_tag = g_type_info_get_tag (type_info);
+
+    if (type_tag == GI_TYPE_TAG_INTERFACE) {
+        GIBaseInfo *interface = g_type_info_get_interface (type_info);
+        switch (g_base_info_get_type (interface)) {
+            case GI_INFO_TYPE_ENUM:
+            case GI_INFO_TYPE_FLAGS:
+                type_tag = g_enum_info_get_storage_type ((GIEnumInfo *)interface);
+                break;
+            default:
+                /* FIXME: we might have something to do for other types */
+                break;
+        }
+        g_base_info_unref (interface);
+    }
+    return type_tag;
+}
+
 void
 _pygi_hash_pointer_to_arg (GIArgument *arg,
-                           GITypeTag  type_tag)
+                           GITypeInfo *type_info)
 {
+    GITypeTag type_tag = _pygi_get_storage_type (type_info);
+
     switch (type_tag) {
         case GI_TYPE_TAG_INT8:
             arg->v_int8 = GPOINTER_TO_INT (arg->v_pointer);
@@ -122,8 +145,10 @@ _pygi_hash_pointer_to_arg (GIArgument *arg,
 
 gpointer
 _pygi_arg_to_hash_pointer (const GIArgument *arg,
-                           GITypeTag        type_tag)
+                           GITypeInfo       *type_info)
 {
+    GITypeTag type_tag = _pygi_get_storage_type (type_info);
+
     switch (type_tag) {
         case GI_TYPE_TAG_INT8:
             return GINT_TO_POINTER (arg->v_int8);
@@ -631,7 +656,7 @@ list_item_error:
                 }
 
                 g_hash_table_insert (hash_table, key.v_pointer,
-                                     _pygi_arg_to_hash_pointer (&value, g_type_info_get_tag (value_type_info)));
+                                     _pygi_arg_to_hash_pointer (&value, value_type_info));
                 continue;
 
 hash_table_item_error:
@@ -925,7 +950,7 @@ _pygi_argument_to_object (GIArgument  *arg,
                     break;
                 }
 
-                _pygi_hash_pointer_to_arg (&value, g_type_info_get_tag (value_type_info));
+                _pygi_hash_pointer_to_arg (&value, value_type_info);
                 py_value = _pygi_argument_to_object (&value, value_type_info, item_transfer);
                 if (py_value == NULL) {
                     Py_DECREF (py_key);
index a923fd9..2e889dd 100644 (file)
@@ -37,10 +37,10 @@ gssize _pygi_argument_array_length_marshal (gsize length_arg_index,
                                             void *user_data2);
 
 gpointer _pygi_arg_to_hash_pointer (const GIArgument *arg,
-                                    GITypeTag         type_tag);
+                                    GITypeInfo       *type_info);
 
 void _pygi_hash_pointer_to_arg (GIArgument *arg,
-                                GITypeTag   type_tag);
+                                GITypeInfo *type_info);
 
 GArray* _pygi_argument_to_array (GIArgument  *arg,
                                  PyGIArgArrayLengthPolicy array_length_policy,
index b6515c3..4a5e112 100644 (file)
@@ -255,6 +255,11 @@ _pygi_marshal_from_py_filename (PyObject          *py_arg,
     GError *error = NULL;
     PyObject *tmp = NULL;
 
+    if (py_arg == Py_None) {
+        arg->v_pointer = NULL;
+        return TRUE;
+    }
+
     if (PyUnicode_Check (py_arg)) {
         tmp = PyUnicode_AsUTF8String (py_arg);
         if (!tmp)
index 84155d7..647bf04 100644 (file)
@@ -134,8 +134,8 @@ _pygi_marshal_from_py_ghash (PyGIInvokeState   *state,
             goto err;
 
         g_hash_table_insert (hash_,
-                             _pygi_arg_to_hash_pointer (&key, hash_cache->key_cache->type_tag),
-                             _pygi_arg_to_hash_pointer (&value, hash_cache->value_cache->type_tag));
+                             _pygi_arg_to_hash_pointer (&key, hash_cache->key_cache->type_info),
+                             _pygi_arg_to_hash_pointer (&value, hash_cache->value_cache->type_info));
         continue;
 err:
         /* FIXME: cleanup hash keys and values */
@@ -264,7 +264,7 @@ _pygi_marshal_to_py_ghash (PyGIInvokeState   *state,
         int retval;
 
 
-        _pygi_hash_pointer_to_arg (&key_arg, hash_cache->key_cache->type_tag);
+        _pygi_hash_pointer_to_arg (&key_arg, hash_cache->key_cache->type_info);
         py_key = key_to_py_marshaller ( state,
                                       callable_cache,
                                       key_arg_cache,
@@ -275,7 +275,7 @@ _pygi_marshal_to_py_ghash (PyGIInvokeState   *state,
             return NULL;
         }
 
-        _pygi_hash_pointer_to_arg (&value_arg, hash_cache->value_cache->type_tag);
+        _pygi_hash_pointer_to_arg (&value_arg, hash_cache->value_cache->type_info);
         py_value = value_to_py_marshaller ( state,
                                           callable_cache,
                                           value_arg_cache,
index 3eee849..72a3d20 100644 (file)
@@ -75,7 +75,7 @@ _pygi_marshal_from_py_glist (PyGIInvokeState   *state,
             goto err;
 
         Py_DECREF (py_item);
-        list_ = g_list_prepend (list_, _pygi_arg_to_hash_pointer (&item, sequence_cache->item_cache->type_tag));
+        list_ = g_list_prepend (list_, _pygi_arg_to_hash_pointer (&item, sequence_cache->item_cache->type_info));
         continue;
 err:
         /* FIXME: clean up list
@@ -152,7 +152,7 @@ _pygi_marshal_from_py_gslist (PyGIInvokeState   *state,
             goto err;
 
         Py_DECREF (py_item);
-        list_ = g_slist_prepend (list_, _pygi_arg_to_hash_pointer (&item, sequence_cache->item_cache->type_tag));
+        list_ = g_slist_prepend (list_, _pygi_arg_to_hash_pointer (&item, sequence_cache->item_cache->type_info));
         continue;
 err:
         /* FIXME: Clean up list
@@ -261,7 +261,7 @@ _pygi_marshal_to_py_glist (PyGIInvokeState   *state,
         PyObject *py_item;
 
         item_arg.v_pointer = list_->data;
-        _pygi_hash_pointer_to_arg (&item_arg, item_arg_cache->type_tag);
+        _pygi_hash_pointer_to_arg (&item_arg, item_arg_cache->type_info);
         py_item = item_to_py_marshaller (state,
                                          callable_cache,
                                          item_arg_cache,
@@ -310,7 +310,7 @@ _pygi_marshal_to_py_gslist (PyGIInvokeState   *state,
         PyObject *py_item;
 
         item_arg.v_pointer = list_->data;
-        _pygi_hash_pointer_to_arg (&item_arg, item_arg_cache->type_tag);
+        _pygi_hash_pointer_to_arg (&item_arg, item_arg_cache->type_info);
         py_item = item_to_py_marshaller (state,
                                         callable_cache,
                                         item_arg_cache,
index df445ce..3810adf 100644 (file)
@@ -172,6 +172,8 @@ CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@
+CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@
+CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@
 CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@
 CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@
 CPP = @CPP@
index 351e59b..d0540c2 100644 (file)
@@ -172,6 +172,8 @@ CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@
+CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@
+CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@
 CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@
 CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@
 CPP = @CPP@
index 233175c..3c907f1 100644 (file)
@@ -135,7 +135,6 @@ EXTRA_DIST = \
 clean-local:
        rm -f $(check_LTLIBRARIES:.la=.$(OS_EXT)) file.txt~
 
-DBUS_LAUNCH=$(shell which dbus-launch)
 RUN_TESTS_ENV_VARS= \
        PYTHONPATH=$(top_builddir):$(top_builddir)/tests:$${PYTHONPATH:+:$$PYTHONPATH} \
        LD_LIBRARY_PATH=$(builddir)/.libs:$$LD_LIBRARY_PATH \
@@ -149,10 +148,8 @@ RUN_TESTS_ENV_VARS= \
 # pygtkcompat tests need to be run in a separate process as they
 # clobber global name space
 check-local: $(check_LTLIBRARIES:.la=.$(OS_EXT)) $(test_typelibs) gschemas.compiled
-       export `$(DBUS_LAUNCH)` && \
-       $(RUN_TESTS_ENV_VARS) $(EXEC_NAME) $(PYTHON) -Wd $(srcdir)/runtests.py; rc=$$?; \
-       [ "$$rc" -ne 0 ] || [ -n "$$TEST_NAMES" ] || { TEST_NAMES=compat_test_pygtk $(RUN_TESTS_ENV_VARS) $(EXEC_NAME) $(PYTHON) -Wd -Werror::PendingDeprecationWarning -Werror::DeprecationWarning -Werror::RuntimeWarning $(srcdir)/runtests.py; rc=$$?; }; \
-       kill $$DBUS_SESSION_BUS_PID; \
+       $(RUN_TESTS_ENV_VARS) dbus-run-session -- $(EXEC_NAME) $(PYTHON) -Wd $(srcdir)/runtests.py; rc=$$?; \
+       [ "$$rc" -ne 0 ] || [ -n "$$TEST_NAMES" ] || { TEST_NAMES=compat_test_pygtk $(RUN_TESTS_ENV_VARS) dbus-run-session -- $(EXEC_NAME) $(PYTHON) -Wd -Werror::PendingDeprecationWarning -Werror::DeprecationWarning -Werror::RuntimeWarning $(srcdir)/runtests.py; rc=$$?; }; \
        exit $$rc
 
 check.gdb:
index c2f2d6c..33b800a 100644 (file)
@@ -219,6 +219,8 @@ CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@
+CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@
+CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@
 CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@
 CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@
 CPP = @CPP@
@@ -449,7 +451,6 @@ EXTRA_DIST = \
        gi/overrides/Regress.py \
        $(NULL)
 
-DBUS_LAUNCH = $(shell which dbus-launch)
 RUN_TESTS_ENV_VARS = \
        PYTHONPATH=$(top_builddir):$(top_builddir)/tests:$${PYTHONPATH:+:$$PYTHONPATH} \
        LD_LIBRARY_PATH=$(builddir)/.libs:$$LD_LIBRARY_PATH \
@@ -857,10 +858,8 @@ clean-local:
 # pygtkcompat tests need to be run in a separate process as they
 # clobber global name space
 check-local: $(check_LTLIBRARIES:.la=.$(OS_EXT)) $(test_typelibs) gschemas.compiled
-       export `$(DBUS_LAUNCH)` && \
-       $(RUN_TESTS_ENV_VARS) $(EXEC_NAME) $(PYTHON) -Wd $(srcdir)/runtests.py; rc=$$?; \
-       [ "$$rc" -ne 0 ] || [ -n "$$TEST_NAMES" ] || { TEST_NAMES=compat_test_pygtk $(RUN_TESTS_ENV_VARS) $(EXEC_NAME) $(PYTHON) -Wd -Werror::PendingDeprecationWarning -Werror::DeprecationWarning -Werror::RuntimeWarning $(srcdir)/runtests.py; rc=$$?; }; \
-       kill $$DBUS_SESSION_BUS_PID; \
+       $(RUN_TESTS_ENV_VARS) dbus-run-session -- $(EXEC_NAME) $(PYTHON) -Wd $(srcdir)/runtests.py; rc=$$?; \
+       [ "$$rc" -ne 0 ] || [ -n "$$TEST_NAMES" ] || { TEST_NAMES=compat_test_pygtk $(RUN_TESTS_ENV_VARS) dbus-run-session -- $(EXEC_NAME) $(PYTHON) -Wd -Werror::PendingDeprecationWarning -Werror::DeprecationWarning -Werror::RuntimeWarning $(srcdir)/runtests.py; rc=$$?; }; \
        exit $$rc
 
 check.gdb:
index 9624077..85a9fba 100644 (file)
@@ -35,3 +35,58 @@ gi_marshalling_tests_compare_two_gerrors_in_gvalue (GValue *v, GValue *v1)
   g_assert_cmpint (error->code, ==, error1->code);
   g_assert_cmpstr (error->message, ==, error1->message);
 }
+
+/**
+ * gi_marshalling_tests_ghashtable_enum_none_in:
+ * @hash_table: (element-type gint GIMarshallingTestsExtraEnum) (transfer none):
+ */
+void
+gi_marshalling_tests_ghashtable_enum_none_in (GHashTable *hash_table)
+{
+  g_assert_cmpint (GPOINTER_TO_INT (g_hash_table_lookup (hash_table, GINT_TO_POINTER (1))), ==, GI_MARSHALLING_TESTS_EXTRA_ENUM_VALUE1);
+  g_assert_cmpint (GPOINTER_TO_INT (g_hash_table_lookup (hash_table, GINT_TO_POINTER (2))), ==, GI_MARSHALLING_TESTS_EXTRA_ENUM_VALUE2);
+  g_assert_cmpint (GPOINTER_TO_INT (g_hash_table_lookup (hash_table, GINT_TO_POINTER (3))), ==, GI_MARSHALLING_TESTS_EXTRA_ENUM_VALUE3);
+}
+
+/**
+ * gi_marshalling_tests_ghashtable_enum_none_return:
+ *
+ * Returns: (element-type gint GIMarshallingTestsExtraEnum) (transfer none):
+ */
+GHashTable *
+gi_marshalling_tests_ghashtable_enum_none_return (void)
+{
+  static GHashTable *hash_table = NULL;
+
+  if (hash_table == NULL)
+    {
+      hash_table = g_hash_table_new (NULL, NULL);
+      g_hash_table_insert (hash_table, GINT_TO_POINTER (1), GINT_TO_POINTER (GI_MARSHALLING_TESTS_EXTRA_ENUM_VALUE1));
+      g_hash_table_insert (hash_table, GINT_TO_POINTER (2), GINT_TO_POINTER (GI_MARSHALLING_TESTS_EXTRA_ENUM_VALUE2));
+      g_hash_table_insert (hash_table, GINT_TO_POINTER (3), GINT_TO_POINTER (GI_MARSHALLING_TESTS_EXTRA_ENUM_VALUE3));
+    }
+
+  return hash_table;
+}
+
+/**
+ * gi_marshalling_tests_filename_copy:
+ * @path_in: (type filename) (nullable)
+ *
+ * Returns: (type filename) (nullable)
+ */
+gchar *
+gi_marshalling_tests_filename_copy (gchar *path_in)
+{
+  return g_strdup (path_in);
+}
+
+/**
+ * gi_marshalling_tests_filename_exists:
+ * @path: (type filename)
+ */
+gboolean
+gi_marshalling_tests_filename_exists (gchar *path)
+{
+  return g_file_test (path, G_FILE_TEST_EXISTS);
+}
index 6858551..51a65f2 100644 (file)
 
 #include <glib-object.h>
 
+typedef enum
+{
+  GI_MARSHALLING_TESTS_EXTRA_ENUM_VALUE1,
+  GI_MARSHALLING_TESTS_EXTRA_ENUM_VALUE2,
+  GI_MARSHALLING_TESTS_EXTRA_ENUM_VALUE3 = 42
+} GIMarshallingTestsExtraEnum;
+
+
 void gi_marshalling_tests_compare_two_gerrors_in_gvalue (GValue *v, GValue *v1);
+void gi_marshalling_tests_ghashtable_enum_none_in (GHashTable *hash_table);
+GHashTable * gi_marshalling_tests_ghashtable_enum_none_return (void);
+
+gchar * gi_marshalling_tests_filename_copy (gchar *path_in);
+gboolean gi_marshalling_tests_filename_exists (gchar *path);
 
 #endif /* EXTRA_TESTS */
index 1fbc216..d0c72b6 100644 (file)
@@ -710,6 +710,10 @@ class TestFilename(unittest.TestCase):
         self.assertEqual(result, True)
         self.assertEqual(contents, b'hello world!\n\x01\x02')
 
+    def test_filename_in_nullable(self):
+        self.assertTrue(GIMarshallingTests.filename_copy(None) is None)
+        self.assertRaises(TypeError, GIMarshallingTests.filename_exists, None)
+
     def test_filename_out(self):
         self.assertRaises(GLib.GError, GLib.Dir.make_tmp, 'test')
 
@@ -1265,6 +1269,17 @@ class TestGHashTable(unittest.TestCase):
         self.assertEqual({'-1': '1', '0': '0', '1': '1'},
                          GIMarshallingTests.ghashtable_utf8_full_inout(i))
 
+    def test_ghashtable_enum_none_in(self):
+        GIMarshallingTests.ghashtable_enum_none_in({1: GIMarshallingTests.ExtraEnum.VALUE1,
+                                                    2: GIMarshallingTests.ExtraEnum.VALUE2,
+                                                    3: GIMarshallingTests.ExtraEnum.VALUE3})
+
+    def test_ghashtable_enum_none_return(self):
+        self.assertEqual({1: GIMarshallingTests.ExtraEnum.VALUE1,
+                          2: GIMarshallingTests.ExtraEnum.VALUE2,
+                          3: GIMarshallingTests.ExtraEnum.VALUE3},
+                         GIMarshallingTests.ghashtable_enum_none_return())
+
 
 class TestGValue(unittest.TestCase):