Bugfix update to py-gobject-2.28.6.
-> fixes several bugs and crashes.
This commit is contained in:
parent
1ec7f8c88c
commit
5d2b86a891
@ -1,13 +1,12 @@
|
||||
# $OpenBSD: Makefile,v 1.42 2011/06/08 17:39:25 jasper Exp $
|
||||
# $OpenBSD: Makefile,v 1.43 2011/06/13 16:46:39 ajacoutot Exp $
|
||||
|
||||
COMMENT= Python bindings for glib2 gobject
|
||||
|
||||
GNOME_PROJECT= pygobject
|
||||
GNOME_VERSION= 2.28.4
|
||||
GNOME_VERSION= 2.28.6
|
||||
|
||||
PKGNAME= py-gobject-${GNOME_VERSION}
|
||||
|
||||
REVISION= 3
|
||||
EPOCH= 0
|
||||
|
||||
CATEGORIES= devel
|
||||
|
@ -1,5 +1,5 @@
|
||||
MD5 (pygobject-2.28.4.tar.bz2) = FOcA1fS4rwCmimvN1lqNuQ==
|
||||
RMD160 (pygobject-2.28.4.tar.bz2) = Wo+1o2krat98J6p2V/ERhjckZyY=
|
||||
SHA1 (pygobject-2.28.4.tar.bz2) = qYhxmFlgkjsiRRY7fCFxz9Ht41Y=
|
||||
SHA256 (pygobject-2.28.4.tar.bz2) = cOOgXdX2iOaLXa+iQSzU/bwK+DeSpXUu9jU8SszyAiw=
|
||||
SIZE (pygobject-2.28.4.tar.bz2) = 882762
|
||||
MD5 (pygobject-2.28.6.tar.bz2) = pD14MijdMomeaQg1K4MI8w==
|
||||
RMD160 (pygobject-2.28.6.tar.bz2) = 5FMfrNXnPPywd9gf+HKSzxQsv/8=
|
||||
SHA1 (pygobject-2.28.6.tar.bz2) = Ttp9K5f0laKtfUzcI00IylQI2dU=
|
||||
SHA256 (pygobject-2.28.6.tar.bz2) = 5L/gF/qEWUAYTIKk2JSds0FMsp38hIFft2Npfchb3O4=
|
||||
SIZE (pygobject-2.28.6.tar.bz2) = 888240
|
||||
|
@ -1,18 +0,0 @@
|
||||
$OpenBSD: patch-gi_gimodule_c,v 1.1 2011/06/08 07:25:55 ajacoutot Exp $
|
||||
|
||||
From bd7b8d96a7420522c1fdc127ef8cfb7d6e8a1b31 Mon Sep 17 00:00:00 2001
|
||||
From: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
|
||||
Date: Mon, 06 Jun 2011 17:05:07 +0000
|
||||
Subject: GVariantType is a boxed struct
|
||||
|
||||
--- gi/gimodule.c.orig Mon Apr 18 17:35:33 2011
|
||||
+++ gi/gimodule.c Wed Jun 8 09:02:44 2011
|
||||
@@ -475,7 +475,7 @@ _wrap_pyg_variant_type_from_string (PyObject *self, Py
|
||||
|
||||
py_type = _pygi_type_import_by_name ("GLib", "VariantType");
|
||||
|
||||
- py_variant = _pygi_struct_new ( (PyTypeObject *) py_type, type_string, FALSE);
|
||||
+ py_variant = _pygi_boxed_new ( (PyTypeObject *) py_type, type_string, FALSE);
|
||||
|
||||
return py_variant;
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
$OpenBSD: patch-gi_module_py,v 1.2 2011/06/08 07:25:55 ajacoutot Exp $
|
||||
|
||||
From 2d73012e5dbcc45a5782a6c119dfb272c14b5a61 Mon Sep 17 00:00:00 2001
|
||||
From: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
|
||||
Date: Mon, 06 Jun 2011 15:38:21 +0000
|
||||
Subject: Use _gi.Struct to wrap fundamentals
|
||||
|
||||
--- gi/module.py.orig Mon Apr 18 17:35:33 2011
|
||||
+++ gi/module.py Wed Jun 8 07:58:53 2011
|
||||
@@ -150,7 +150,9 @@ class IntrospectionModule(object):
|
||||
elif isinstance(info, (StructInfo, UnionInfo)):
|
||||
if g_type.is_a(gobject.TYPE_BOXED):
|
||||
bases = (Boxed,)
|
||||
- elif g_type.is_a(gobject.TYPE_POINTER) or g_type == gobject.TYPE_NONE:
|
||||
+ elif g_type.is_a(gobject.TYPE_POINTER) or \
|
||||
+ g_type == gobject.TYPE_NONE or \
|
||||
+ g_type.fundamental == g_type:
|
||||
bases = (Struct,)
|
||||
else:
|
||||
raise TypeError("unable to create a wrapper for %s.%s" % (info.get_namespace(), info.get_name()))
|
@ -1,29 +0,0 @@
|
||||
$OpenBSD: patch-gi_pygi-argument_c,v 1.1 2011/06/08 07:25:55 ajacoutot Exp $
|
||||
|
||||
From fe386a0ad548a23e30e9cb947bfa2198fb48ef29 Mon Sep 17 00:00:00 2001
|
||||
From: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
|
||||
Date: Mon, 06 Jun 2011 17:07:22 +0000
|
||||
Subject: GVariant has now a GType, take that into account
|
||||
|
||||
--- gi/pygi-argument.c.orig Mon Apr 18 17:36:47 2011
|
||||
+++ gi/pygi-argument.c Wed Jun 8 09:03:58 2011
|
||||
@@ -1084,15 +1084,15 @@ array_success:
|
||||
}
|
||||
|
||||
arg.v_pointer = closure;
|
||||
+ } else if (g_struct_info_is_foreign (info)) {
|
||||
+ PyObject *result;
|
||||
+ result = pygi_struct_foreign_convert_to_g_argument (
|
||||
+ object, info, transfer, &arg);
|
||||
} else if (g_type_is_a (type, G_TYPE_BOXED)) {
|
||||
arg.v_pointer = pyg_boxed_get (object, void);
|
||||
if (transfer == GI_TRANSFER_EVERYTHING) {
|
||||
arg.v_pointer = g_boxed_copy (type, arg.v_pointer);
|
||||
}
|
||||
- } else if ( (type == G_TYPE_NONE) && (g_struct_info_is_foreign (info))) {
|
||||
- PyObject *result;
|
||||
- result = pygi_struct_foreign_convert_to_g_argument (
|
||||
- object, type_info, transfer, &arg);
|
||||
} else if (g_type_is_a (type, G_TYPE_POINTER) || type == G_TYPE_NONE) {
|
||||
g_warn_if_fail (!g_type_info_is_pointer (type_info) || transfer == GI_TRANSFER_NOTHING);
|
||||
arg.v_pointer = pyg_pointer_get (object, void);
|
@ -1,60 +0,0 @@
|
||||
$OpenBSD: patch-gi_pygi-invoke_c,v 1.1 2011/06/08 07:25:55 ajacoutot Exp $
|
||||
|
||||
From fe386a0ad548a23e30e9cb947bfa2198fb48ef29 Mon Sep 17 00:00:00 2001
|
||||
From: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
|
||||
Date: Mon, 06 Jun 2011 17:07:22 +0000
|
||||
Subject: GVariant has now a GType, take that into account
|
||||
|
||||
--- gi/pygi-invoke.c.orig Mon Apr 18 17:36:47 2011
|
||||
+++ gi/pygi-invoke.c Wed Jun 8 09:05:24 2011
|
||||
@@ -378,9 +378,7 @@ _prepare_invocation_state (struct invocation_state *st
|
||||
/* if caller allocates only use one level of indirection */
|
||||
state->out_args[out_args_pos].v_pointer = NULL;
|
||||
state->args[i] = &state->out_args[out_args_pos];
|
||||
- if (g_type_is_a (g_registered_type_info_get_g_type (info), G_TYPE_BOXED)) {
|
||||
- state->args[i]->v_pointer = _pygi_boxed_alloc (info, NULL);
|
||||
- } else if (g_struct_info_is_foreign((GIStructInfo *) info) ) {
|
||||
+ if (g_struct_info_is_foreign((GIStructInfo *) info) ) {
|
||||
PyObject *foreign_struct =
|
||||
pygi_struct_foreign_convert_from_g_argument(state->arg_type_infos[i], NULL);
|
||||
|
||||
@@ -391,6 +389,8 @@ _prepare_invocation_state (struct invocation_state *st
|
||||
state->args[i]);
|
||||
|
||||
Py_DECREF(foreign_struct);
|
||||
+ } else if (g_type_is_a (g_registered_type_info_get_g_type (info), G_TYPE_BOXED)) {
|
||||
+ state->args[i]->v_pointer = _pygi_boxed_alloc (info, NULL);
|
||||
} else {
|
||||
gssize size = g_struct_info_get_size ( (GIStructInfo *) info);
|
||||
state->args[i]->v_pointer = g_malloc0 (size);
|
||||
@@ -457,6 +457,12 @@ _prepare_invocation_state (struct invocation_state *st
|
||||
if (g_type_is_a (type, G_TYPE_BOXED)) {
|
||||
g_assert (state->n_in_args > 0);
|
||||
state->in_args[0].v_pointer = pyg_boxed_get (py_arg, void);
|
||||
+ } else if (g_struct_info_is_foreign (container_info)) {
|
||||
+ PyObject *result;
|
||||
+ result = pygi_struct_foreign_convert_to_g_argument (
|
||||
+ py_arg, container_info,
|
||||
+ GI_TRANSFER_NOTHING,
|
||||
+ &state->in_args[0]);
|
||||
} else if (g_type_is_a (type, G_TYPE_POINTER) || type == G_TYPE_NONE) {
|
||||
g_assert (state->n_in_args > 0);
|
||||
state->in_args[0].v_pointer = pyg_pointer_get (py_arg, void);
|
||||
@@ -688,13 +694,13 @@ _process_invocation_state (struct invocation_state *st
|
||||
|
||||
type = g_registered_type_info_get_g_type ( (GIRegisteredTypeInfo *) info);
|
||||
|
||||
- if (g_type_is_a (type, G_TYPE_BOXED)) {
|
||||
- g_warn_if_fail (transfer == GI_TRANSFER_EVERYTHING);
|
||||
- state->return_value = _pygi_boxed_new (py_type, state->return_arg.v_pointer, transfer == GI_TRANSFER_EVERYTHING);
|
||||
- } else if (type == G_TYPE_NONE && g_struct_info_is_foreign (info)) {
|
||||
+ if (g_struct_info_is_foreign (info)) {
|
||||
state->return_value =
|
||||
pygi_struct_foreign_convert_from_g_argument (
|
||||
state->return_type_info, state->return_arg.v_pointer);
|
||||
+ } else if (g_type_is_a (type, G_TYPE_BOXED)) {
|
||||
+ g_warn_if_fail (transfer == GI_TRANSFER_EVERYTHING);
|
||||
+ state->return_value = _pygi_boxed_new (py_type, state->return_arg.v_pointer, transfer == GI_TRANSFER_EVERYTHING);
|
||||
} else if (g_type_is_a (type, G_TYPE_POINTER) || type == G_TYPE_NONE) {
|
||||
if (transfer != GI_TRANSFER_NOTHING)
|
||||
g_warning ("Return argument in %s returns a struct "
|
Loading…
Reference in New Issue
Block a user