gnustep-dev
[Top][All Lists]
Advanced

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

Re: Forwarding and the GNU runtime one more time (was ANN: GNUstep 2.6.0


From: Nat!
Subject: Re: Forwarding and the GNU runtime one more time (was ANN: GNUstep 2.6.0 for openSUSE 11.4)
Date: Wed, 22 Jun 2011 11:04:35 +0200

Hi

I am generally sorry, that I am not yet an expert on the GNU runtime, but if I 
were, I wouldn't ask questions on this mailing list...

Am 22.06.2011 um 09:30 schrieb David Chisnall:

> You seem to misunderstand the notion of a hook.  __objc_msg_forward* are 
> function pointers in the runtime.  They are set in Foundation to something 
> that handles the forwarding.  The hooks in NeXT / Apple libobjc are different.

> 
> _objc_msgForward() in the Mac runtimes is a private function, and 
> implementation detail, and something that you should never touch.  The fact 
> that you are even considering using it directly means that your code is 
> probably wrong.

Havent't I read this before ? The second time, I wonder, if I should take that 
kind of insinuation, that I am clueless, so kindly...


>  With the GNU runtimes, there are four different forwarding hooks that may be 
> invoked, so inspecting the IMP returned by the lookup is almost certainly 
> wrong.

Ah finally some meat ;) Checking four different hooks is indeed a bit too 
tedious for my taste. But since objc_msg_lookup is never returning on a 
not-found method (even w/o GNUstep), that's not important anymore anyway. 
(Something I did not know beforehand)


> 
> As Nicola said, what are you actually trying to achieve?  There is almost 
> certainly a much simpler way of doing it than this.
> 

Depends on your concept of simplicity. objc_msgLookup in combination with 
_objc_msgForward
  does exactly what I want in one function call.

But I suppose the answer is again, I need two function calls for my purpose in 
the GNU runtime.

Ciao
   Nat!
------------------------------------------------------
This is your life 
and it's ending one minute at a time.  -- Palahniuk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]