Re: boxed types and copies
- From: James Henstridge <james daa com au>
- To: Havoc Pennington <hp redhat com>
- Cc: gtk-devel-list gnome org, timj gtk org
- Subject: Re: boxed types and copies
- Date: Wed, 13 Dec 2000 10:22:32 +0800 (WST)
On 12 Dec 2000, Havoc Pennington wrote:
>
> Hi,
>
> The recent gtk_signal_emit() change broke the text widget - I'm using
> GTK_TYPE_TEXT_ITER, GTK_TYPE_STRING, etc. for the signal signature,
> at James' request, so Python can emit these signals.
>
> However these signal args MUST be passed by reference, it is far too
> slow to copy the inserted string, and the iterator is supposed to be
> modified by the signal handlers.
>
> Moving gtk_signal_emit() to the GValue collector causes it to
> copy-by-value every boxed argument. So I either have to move back to
> GTK_TYPE_POINTER and break language bindings, or leave GtkTextBuffer
> broken.
Moving back to simply using G_TYPE_POINTER would be very bad for
language bindings (and the change for the GtkCTreeNode signal arguments to
G_TYPE_POINTER has made the ctree almost unusable to language bindings).
One possible solution is to allow `derived' G_TYPE_POINTER values. By
this, I mean they would have the same semantics as G_TYPE_POINTER, but
have a different type code, so that language bindings could have a
chance of handling them correctly.
James.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]