Re: [gtk-list] Signals and malloced memory
- From: Havoc Pennington <hp redhat com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Signals and malloced memory
- Date: 06 Apr 2000 01:45:25 -0400
Derek Simkowiak <dereks@kd-dev.com> writes:
> gtkeditable.h has the following comment in its class struct
> definition, just above its list of virtual functions:
>
> /* Virtual functions. get_chars is in paricular not a signal because
> * it returns malloced memory. The others are not signals because
> * they would not be particularly useful as such. (All changes to
> * selection and position do not go through these functions)
> */
>
> My question is about "get_chars is in paricular not a signal
> because it returns malloced memory". This implies that I can't emit a
> signal whose handler takes a pointer to something my object malloced.
>
The comment says you can't _return_ malloced memory, it doesn't say
anything about the arguments.
(If you could return malloced memory, what happens if there are two
signal handlers?)
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]