Re: BonoboUnknown & G_SIGNAL_TYPE_STATIC_SCOPE



Hi Owen,

On Wed, 2002-01-02 at 20:41, Owen Taylor wrote:
> I have to agree with Havoc that this is an inappropriate usage. 
> You are only allowed to use G_SIGNAL_TYPE_STATIC_SCOPE for
> signal arguments, so including it in the type macro is going
> to cause people very unexpected problems.

	I agree it's ugly; but the problem is that if it is included
erroneously, it seems people get g_asserts; if it is not, people get
performance problems that they don't understand - I'd prefer the former
- or to totaly kill bonobo-type.[ch] and use untyped pointers for the
lot really [ which doesn't help bindings much ].

> Sheesh, can't we add a bit of magic / evil C API so that Bonobo_Unknown_ref()
> only holds one reference to the remote object for all local references?
> This doesn't seem like the only place people are going to get bitten.

	No - sadly not; the way the reference counting convention was
constructed does not allow us to distinguish when a Bonobo reference is
being handed, and when a 'weak' or CORBA only reference is being passed.
Thus it is not possible to reliably cache the Bonobo_Unknown reference
count - sad but true.

	Of course; we could add API to make this distinction I suppose - not
too tough; but it seems better to me to wait for Mono & a garbage
collected world, to solve some of the problems at root. Of course -
making the above distinction would be somewhat extremely useful for
other purposes as well, such as connection based reference accounting
etc. but sadly - it's really not feasible to change at this stage IMHO. 

	Either way - I remain interested as to the possible merit of the
default behavior copying all the effectively 'const in' arguments to
these signals - for what is this useful ?. Similarly I'm intrigued by
the amount of locking going on in gsignal.c - as I'm given to understand
that signal emission is not thread safe - [ is this the case ? ].

	Sigh,

		Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]