|
From: | Marko Mikulicic |
Subject: | Re: ffcall - forward:: or forwardInvocation |
Date: | Sun, 19 Aug 2001 04:59:25 -0400 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2) Gecko/20010628 |
Adam Fedor wrote:
Marko Mikulicic wrote:Hello, Trying to a fix gstep-db forwarding problem I noticed that ffcall-compiled base libs skip -[forward::] and call directly -[forwardInvocation:]. If a class does only implement -[forward::] it goes in infinite recursion and crashes. Is it possible or I'm dreaming?Why does NSProxy implement -[forward::] just to pass to -[forwardInvocation:] ?Did the gstep-db devels use -[forward::] because of the lesser overhead or because it's required for a root class ?forward:: is the old Object.h method to forward message.
forwardInvocation: is the new NSObject.h method.
I thought that the forwardInvocation: was called by the forward:: implementation of NSObject, which behavior is intherited by all, but root classes like EOFault. Probably the IMP of NSObject's forward:: is stored somewhere and it's called with static binding. I don't know yet well how are structured internally the sources.I prefer to take insight talking about it before drowning in the code itself :-)
PS: I tried to compile all with libffi and then gstep-db worked perfectly. GDNC crashed. I understand ffcall is the preferred way right now, isn't ?It probably worked because libffi support isn't implemented, so it 'falls back' to the default gcc/mframe code, which works ok on i386 machines but not well on other machines.
gdnd didn't work even on intel with libffi :-)
If I understood correcty then gstep-db code should migrate to forwardInvocation: interface ?
I fixed my copy that way, and also posted a little patch on the bug-gnustep list, but I was not sure if it's correct.
Marko
[Prev in Thread] | Current Thread | [Next in Thread] |