From 441a24af58aadb0ef05a7dd1dedc951b805c9c01 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Wed, 12 Jul 2017 08:37:44 +0900 Subject: [PATCH] Imported Upstream version 3.0.0 Change-Id: Iba01b1d8ac5123e6b8032cdfba8398bc8cdbf474 Signed-off-by: DongHun Kwak --- ChangeLog | 46 +++++++++++++++++++++++++++++++++++++++++ NEWS | 4 ++++ PKG-INFO | 4 ++-- configure | 52 +++++++++++++++++++++++------------------------ configure.ac | 8 ++++---- gi/pygi-argument.c | 2 +- gi/pygi-cache.c | 7 ++----- gi/pygi-info.c | 6 ++++++ gi/pygi-invoke.c | 2 +- gi/pygi-marshal-from-py.c | 17 ++++++++-------- gi/pygi-marshal-to-py.c | 3 +-- 11 files changed, 102 insertions(+), 49 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6e84e2f..d307ea4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,49 @@ +commit 2eed2940c9be099fb6305288d895265e6b35d3d2 +Author: John (J5) Palmieri +Date: Mon Sep 19 13:19:57 2011 -0400 + + prep for 3.0 release + + configure.ac | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +commit fbd58b70c2c3c1128f95a87eb4cc8313b6a401b8 +Author: John (J5) Palmieri +Date: Fri Sep 16 14:19:15 2011 -0400 + + up version required of gobject-introspection to 1.29.0 + + configure.ac | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 225f21117b6b3546989abe22538c784291e86b2a +Author: John (J5) Palmieri +Date: Fri Sep 16 12:26:10 2011 -0400 + + fix most warnings + + * remove some unused vars + * correctly cast vars + * handle deprecated enums in switch statments by using default: + * unused wanrings still remain in some places + + gi/pygi-argument.c | 2 +- + gi/pygi-cache.c | 7 ++----- + gi/pygi-info.c | 6 ++++++ + gi/pygi-invoke.c | 2 +- + gi/pygi-marshal-from-py.c | 17 +++++++++-------- + gi/pygi-marshal-to-py.c | 3 +-- + 6 files changed, 20 insertions(+), 17 deletions(-) + +commit 9a70f01288e1b049206d25d67938907f1b38a490 +Author: John (J5) Palmieri +Date: Fri Sep 16 12:24:38 2011 -0400 + + post release bump + + configure.ac | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + commit 3ec4020205e909ee4400650434f9ae7b89c2bde8 Author: John (J5) Palmieri Date: Thu Sep 15 18:12:01 2011 -0400 diff --git a/NEWS b/NEWS index 58eaed1..2a8cf08 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +3.0.0 19-Sep-2011 + - up version required of gobject-introspection to 1.29.0 (John (J5) Palmieri) + - fix most warnings (John (J5) Palmieri) + 2.90.4 15-Sep-2011 (3.0 pre-release) - do not pass in len(str) to the length argument of gtk_test_buffer_insert* apis (John (J5) Palmieri) - Switch tarball compression format to tar.xz only. (Dieter Verfaillie) diff --git a/PKG-INFO b/PKG-INFO index 1be4de1..4b92ae8 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: PyGObject -Version: 2.90.4 +Version: 3.0.0 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: Johan Dahlin Maintainer-email: johan@gnome.org License: GNU LGPL -Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/2.90/pygobject-2.90.4.tar.gz +Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/3.0/pygobject-3.0.0.tar.gz Description: Python bindings for GLib and GObject Platform: POSIX, Windows Classifier: Development Status :: 5 - Production/Stable diff --git a/configure b/configure index c1cdb38..c09caab 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for pygobject 2.90.4. +# Generated by GNU Autoconf 2.68 for pygobject 3.0.0. # # Report bugs to . # @@ -571,8 +571,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='pygobject' PACKAGE_TARNAME='pygobject' -PACKAGE_VERSION='2.90.4' -PACKAGE_STRING='pygobject 2.90.4' +PACKAGE_VERSION='3.0.0' +PACKAGE_STRING='pygobject 3.0.0' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject' PACKAGE_URL='' @@ -1358,7 +1358,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 2.90.4 to adapt to many kinds of systems. +\`configure' configures pygobject 3.0.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1428,7 +1428,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of pygobject 2.90.4:";; + short | recursive ) echo "Configuration of pygobject 3.0.0:";; esac cat <<\_ACEOF @@ -1553,7 +1553,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -pygobject configure 2.90.4 +pygobject configure 3.0.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1831,7 +1831,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 2.90.4, which was +It was created by pygobject $as_me 3.0.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2185,19 +2185,19 @@ ACLOCAL_AMFLAGS="-I m4 -I ." -$as_echo "#define PYGOBJECT_MAJOR_VERSION 2" >>confdefs.h +$as_echo "#define PYGOBJECT_MAJOR_VERSION 3" >>confdefs.h -PYGOBJECT_MAJOR_VERSION=2 +PYGOBJECT_MAJOR_VERSION=3 -$as_echo "#define PYGOBJECT_MINOR_VERSION 90" >>confdefs.h +$as_echo "#define PYGOBJECT_MINOR_VERSION 0" >>confdefs.h -PYGOBJECT_MINOR_VERSION=90 +PYGOBJECT_MINOR_VERSION=0 -$as_echo "#define PYGOBJECT_MICRO_VERSION 4" >>confdefs.h +$as_echo "#define PYGOBJECT_MICRO_VERSION 0" >>confdefs.h -PYGOBJECT_MICRO_VERSION=4 +PYGOBJECT_MICRO_VERSION=0 ac_config_headers="$ac_config_headers config.h" @@ -2681,7 +2681,7 @@ fi # Define the identity of the package. PACKAGE='pygobject' - VERSION='2.90.4' + VERSION='3.0.0' cat >>confdefs.h <<_ACEOF @@ -12017,7 +12017,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -pygobject config.lt 2.90.4 +pygobject config.lt 3.0.0 configured by $0, generated by GNU Autoconf 2.68. Copyright (C) 2010 Free Software Foundation, Inc. @@ -15726,16 +15726,16 @@ if test -n "$GI_CFLAGS"; then elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.24.0 - gobject-introspection-1.0 >= 0.10.2 + gobject-introspection-1.0 >= 1.29.0 \""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.24.0 - gobject-introspection-1.0 >= 0.10.2 + gobject-introspection-1.0 >= 1.29.0 ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GI_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.24.0 - gobject-introspection-1.0 >= 0.10.2 + gobject-introspection-1.0 >= 1.29.0 " 2>/dev/null` else pkg_failed=yes @@ -15748,16 +15748,16 @@ if test -n "$GI_LIBS"; then elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.24.0 - gobject-introspection-1.0 >= 0.10.2 + gobject-introspection-1.0 >= 1.29.0 \""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.24.0 - gobject-introspection-1.0 >= 0.10.2 + gobject-introspection-1.0 >= 1.29.0 ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GI_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.24.0 - gobject-introspection-1.0 >= 0.10.2 + gobject-introspection-1.0 >= 1.29.0 " 2>/dev/null` else pkg_failed=yes @@ -15779,18 +15779,18 @@ else fi if test $_pkg_short_errors_supported = yes; then GI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.24.0 - gobject-introspection-1.0 >= 0.10.2 + gobject-introspection-1.0 >= 1.29.0 " 2>&1` else GI_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.24.0 - gobject-introspection-1.0 >= 0.10.2 + gobject-introspection-1.0 >= 1.29.0 " 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GI_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (glib-2.0 >= 2.24.0 - gobject-introspection-1.0 >= 0.10.2 + gobject-introspection-1.0 >= 1.29.0 ) were not met: $GI_PKG_ERRORS @@ -16723,7 +16723,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 2.90.4, which was +This file was extended by pygobject $as_me 3.0.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16789,7 +16789,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 2.90.4 +pygobject config.status 3.0.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 4719176..8946b85 100644 --- a/configure.ac +++ b/configure.ac @@ -10,13 +10,13 @@ m4_define(python_min_ver, 2.5.2) m4_define(python3_min_ver, 3.1) dnl the pygobject version number -m4_define(pygobject_major_version, 2) -m4_define(pygobject_minor_version, 90) -m4_define(pygobject_micro_version, 4) +m4_define(pygobject_major_version, 3) +m4_define(pygobject_minor_version, 0) +m4_define(pygobject_micro_version, 0) m4_define(pygobject_version, pygobject_major_version.pygobject_minor_version.pygobject_micro_version) dnl versions of packages we require ... -m4_define(introspection_required_version, 0.10.2) +m4_define(introspection_required_version, 1.29.0) m4_define(py2cairo_required_version, 1.2.0) m4_define(py3cairo_required_version, 1.10.0) m4_define(glib_required_version, 2.24.0) diff --git a/gi/pygi-argument.c b/gi/pygi-argument.c index 76ba6d9..4564f3d 100644 --- a/gi/pygi-argument.c +++ b/gi/pygi-argument.c @@ -1775,7 +1775,7 @@ _pygi_argument_to_object (GIArgument *arg, break; } case GI_TYPE_TAG_ERROR: - if (pyglib_error_check (&arg->v_pointer)) { + if (pyglib_error_check ( (GError **) &arg->v_pointer)) { PyObject *err_type; PyObject *err_value; PyObject *err_trace; diff --git a/gi/pygi-cache.c b/gi/pygi-cache.c index 659c424..41ca32c 100644 --- a/gi/pygi-cache.c +++ b/gi/pygi-cache.c @@ -150,7 +150,6 @@ _sequence_cache_new (GITypeInfo *type_info, { PyGISequenceCache *sc; GITypeInfo *item_type_info; - GITypeTag item_type_tag; GITransfer item_transfer; sc = g_slice_new0 (PyGISequenceCache); @@ -243,6 +242,8 @@ _callback_cache_new (GIArgInfo *arg_info, PyGICallbackCache *cc; cc = g_slice_new0 (PyGICallbackCache); + ( (PyGIArgCache *)cc)->destroy_notify = (GDestroyNotify)_callback_cache_free_func; + cc->user_data_index = g_arg_info_get_closure (arg_info); if (cc->user_data_index != -1) cc->user_data_index += child_offset; @@ -736,8 +737,6 @@ _arg_cache_new_for_interface (GIInterfaceInfo *iface_info, (callable_cache->function_type == PYGI_FUNCTION_TYPE_METHOD || callable_cache->function_type == PYGI_FUNCTION_TYPE_VFUNC) ? 1: 0; - GI_IS_INTERFACE_INFO (iface_info); - info_type = g_base_info_get_type ( (GIBaseInfo *)iface_info); /* Callbacks are special cased */ @@ -861,8 +860,6 @@ _arg_cache_new (GITypeInfo *type_info, gssize child_offset = 0; GITypeTag type_tag; - GI_IS_TYPE_INFO (type_info); - type_tag = g_type_info_get_tag (type_info); if (callable_cache != NULL) diff --git a/gi/pygi-info.c b/gi/pygi-info.c index 30e1956..bf3af58 100644 --- a/gi/pygi-info.c +++ b/gi/pygi-info.c @@ -192,6 +192,9 @@ _pygi_info_new (GIBaseInfo *info) case GI_INFO_TYPE_UNRESOLVED: type = &PyGIUnresolvedInfo_Type; break; + default: + g_assert_not_reached(); + break; } self = (PyGIBaseInfo *) type->tp_alloc (type, 0); @@ -484,6 +487,7 @@ _pygi_g_type_info_size (GITypeInfo *type_info) case GI_INFO_TYPE_ARG: case GI_INFO_TYPE_TYPE: case GI_INFO_TYPE_UNRESOLVED: + default: g_assert_not_reached(); break; } @@ -862,7 +866,9 @@ pygi_g_struct_info_is_simple (GIStructInfo *struct_info) case GI_INFO_TYPE_ARG: case GI_INFO_TYPE_TYPE: case GI_INFO_TYPE_UNRESOLVED: + default: g_assert_not_reached(); + break; } g_base_info_unref (info); diff --git a/gi/pygi-invoke.c b/gi/pygi-invoke.c index f669c2e..0064fe5 100644 --- a/gi/pygi-invoke.c +++ b/gi/pygi-invoke.c @@ -472,7 +472,7 @@ _invoke_marshal_in_args (PyGIInvokeState *state, PyGICallableCache *cache) if (arg_cache->from_py_marshaller != NULL) { if (!arg_cache->allow_none && py_arg == Py_None) { PyErr_Format (PyExc_TypeError, - "Argument %i does not allow None as a value", + "Argument %zd does not allow None as a value", i); pygi_marshal_cleanup_args_from_py_parameter_fail (state, diff --git a/gi/pygi-marshal-from-py.c b/gi/pygi-marshal-from-py.c index 6d41eb8..fa74a22 100644 --- a/gi/pygi-marshal-from-py.c +++ b/gi/pygi-marshal-from-py.c @@ -25,8 +25,6 @@ #include #include - -#include #include #include @@ -406,7 +404,7 @@ _pygi_marshal_from_py_uint64 (PyGIInvokeState *state, if (PyInt_Check (py_long)) { long long_ = PyInt_AsLong (py_long); if (long_ < 0) { - PyErr_Format (PyExc_ValueError, "%ld not in range %d to %llu", + PyErr_Format (PyExc_ValueError, "%ld not in range %d to %lu", long_, 0, G_MAXUINT64); return FALSE; } @@ -444,7 +442,7 @@ _pygi_marshal_from_py_uint64 (PyGIInvokeState *state, Py_DECREF (py_str); - PyErr_Format (PyExc_ValueError, "%s not in range %d to %llu", + PyErr_Format (PyExc_ValueError, "%s not in range %d to %lu", long_str, 0, G_MAXUINT64); g_free (long_str); @@ -452,7 +450,7 @@ _pygi_marshal_from_py_uint64 (PyGIInvokeState *state, } if (ulong_ > G_MAXUINT64) { - PyErr_Format (PyExc_ValueError, "%llu not in range %d to %llu", ulong_, 0, G_MAXUINT64); + PyErr_Format (PyExc_ValueError, "%lu not in range %d to %lu", ulong_, 0, G_MAXUINT64); return FALSE; } @@ -898,10 +896,11 @@ _pygi_marshal_from_py_glist (PyGIInvokeState *state, list_ = g_list_append (list_, item.v_pointer); continue; err: + /* FIXME: clean up list if (sequence_cache->item_cache->from_py_cleanup != NULL) { PyGIMarshalCleanupFunc cleanup = sequence_cache->item_cache->from_py_cleanup; } - + */ g_list_free (list_); _PyGI_ERROR_PREFIX ("Item %i: ", i); return FALSE; @@ -964,9 +963,11 @@ _pygi_marshal_from_py_gslist (PyGIInvokeState *state, list_ = g_slist_append (list_, item.v_pointer); continue; err: + /* FIXME: Clean up list if (sequence_cache->item_cache->from_py_cleanup != NULL) { PyGIMarshalCleanupFunc cleanup = sequence_cache->item_cache->from_py_cleanup; } + */ g_slist_free (list_); _PyGI_ERROR_PREFIX ("Item %i: ", i); @@ -1316,13 +1317,13 @@ _pygi_marshal_from_py_interface_struct (PyGIInvokeState *state, arg->v_pointer = value; return TRUE; } else if (iface_cache->is_foreign) { - gboolean success; + PyObject *success; success = pygi_struct_foreign_convert_to_g_argument (py_arg, iface_cache->interface_info, arg_cache->transfer, arg); - return success; + return (success == Py_None); } else if (!PyObject_IsInstance (py_arg, iface_cache->py_type)) { PyErr_Format (PyExc_TypeError, "Expected %s, but got %s", iface_cache->type_name, diff --git a/gi/pygi-marshal-to-py.c b/gi/pygi-marshal-to-py.c index cb62c49..48dfa08 100644 --- a/gi/pygi-marshal-to-py.c +++ b/gi/pygi-marshal-to-py.c @@ -26,7 +26,6 @@ #include #include -#include #include #include @@ -276,7 +275,7 @@ _pygi_marshal_to_py_array (PyGIInvokeState *state, if (seq_cache->fixed_size >= 0) { len = seq_cache->fixed_size; } else if (seq_cache->is_zero_terminated) { - len = g_strv_length (arg->v_string); + len = g_strv_length ((gchar **)arg->v_pointer); } else { GIArgument *len_arg = state->args[seq_cache->len_arg_index]; len = len_arg->v_long; -- 2.7.4