+3.32.1 - 2019-04-20
+-------------------
+
+* tests/gimarshallingtestsextra.c/h: relicense to LGPLv2.1+ :issue:`320`
+* meson: add ``tests`` option for disabling tests :mr:`113` (:user:`Adam Duskett <aduskett>`)
+* meson: tests: pass ``--quiet`` to g-ir-scanner :mr:`114` (:user:`Tim-Philipp Müller <tpm>`)
+* Fix a crash when marshalling a GError to Python fails :mr:`115`
+* Fix leak of transfer-full/container C arrays :mr:`117` (:user:`Tomasz Miąsko <tmiasko>`)
+
+
3.32.0 - 2019-03-10
-------------------
return;
free_array = TRUE;
- free_array_full = FALSE;
+ free_array_full = arg_cache->transfer != GI_TRANSFER_NOTHING;
} else if (array_cache->array_type == GI_ARRAY_TYPE_PTR_ARRAY) {
ptr_array_ = (GPtrArray *) data;
} else {
*
* Checks to see if @error has been set. If @error has been set, then a
* GLib.GError Python exception object is returned (but not raised).
+ * If not error is set returns Py_None.
*
- * Returns: a GLib.GError Python exception object, or NULL.
+ * Returns: a GLib.GError Python exception object, or Py_None,
+ * or NULL and sets an error if creating the exception object fails.
*/
PyObject *
pygi_error_marshal_to_py (GError **error)
g_return_val_if_fail(error != NULL, NULL);
if (*error == NULL)
- return NULL;
+ Py_RETURN_NONE;
state = PyGILState_Ensure();
state = PyGILState_Ensure();
exc_instance = pygi_error_marshal_to_py (error);
- PyErr_SetObject(PyGError, exc_instance);
- Py_DECREF(exc_instance);
+ if (exc_instance != NULL) {
+ PyErr_SetObject(PyGError, exc_instance);
+ Py_DECREF(exc_instance);
+ } else {
+ PyErr_Print ();
+ PyErr_SetString (PyExc_RuntimeError, "Converting the GError failed");
+ }
g_clear_error(error);
PyGILState_Release(state);
g_error_free (error);
}
- if (py_obj != NULL) {
- return py_obj;
- } else {
- Py_RETURN_NONE;
- }
+ return py_obj;
}
static gboolean
{
GError *gerror = (GError *) g_value_get_boxed (value);
PyObject *pyerr = pygi_error_marshal_to_py (&gerror);
- if (pyerr == NULL) {
- Py_RETURN_NONE;
- } else {
- return pyerr;
- }
+ return pyerr;
}
static int
project('pygobject', 'c',
- version : '3.32.0',
+ version : '3.32.1',
meson_version : '>= 0.46.0',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized'])
subdir('gi')
subdir('pygtkcompat')
+with_tests = get_option('tests')
+if with_tests
subdir('tests')
+endif
option('python', type : 'string', value : 'python3')
option('pycairo', type : 'boolean', value : true, description : 'build with pycairo integration')
+option('tests', type : 'boolean', value : true, description : 'build unit tests')
from distutils.spawn import find_executable
-PYGOBJECT_VERSION = "3.32.0"
+PYGOBJECT_VERSION = "3.32.1"
GLIB_VERSION_REQUIRED = "2.48.0"
GI_VERSION_REQUIRED = "1.46.0"
PYCAIRO_VERSION_REQUIRED = "1.11.1"
*
* Copyright (C) 2016 Thibault Saunier <tsaunier@gnome.org>
*
- * This file is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 3 of the
- * License, or (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
*
- * This file is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "gimarshallingtestsextra.h"
*
* Copyright (C) 2016 Thibault Saunier <tsaunier@gnome.org>
*
- * This file is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 3 of the
- * License, or (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
*
- * This file is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef EXTRA_TESTS
symbol_prefix : 'gi_marshalling_tests',
includes : ['Gio-2.0'],
build_by_default : true,
+ extra_args: ['--quiet'],
)
regress_sources += ['regressextra.c']
includes : ['Gio-2.0', 'cairo-1.0'],
build_by_default : true,
dependencies : regress_deps,
- extra_args: regress_c_args,
+ extra_args: regress_c_args + ['--quiet'],
)
helper_sources = [