discuss-gnustep
[Top][All Lists]
Advanced

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

Re: MulleEOInterface


From: Dirk Lattermann
Subject: Re: MulleEOInterface
Date: Sat, 24 May 2003 19:35:57 +0200
User-agent: Mutt/1.4i

On Fri, May 23, 2003 at 09:56:15PM +0200, Marcus M?ller wrote:
> Hi Dirk, 
> 
> On Friday, May 23, 2003, at 17:51 Europe/Berlin, Dirk Lattermann wrote: 
> 
> 
> > Hello, 
> > 
> > I succeeded in compiling MulleEOInterface with GNUstep and 
> > GDL2.  I fixed several bugs (I think) and got a few things to work, 
> > but didn't try the much. 
> > 
> > There are some doubtful things I have done: 
> > 
> > - I replaced 
> >   objc_msgSend(bla, selector, argument) with 
> >   [bla performSelector: selector withObject: argument] 
> > but this occurs in code that I didn't use in tests. 
> > 
>  
> this stuff was probably there to speed things up (Nat! is a 
> well-respected speed optimization fanatic).  
> 
> You can use the following on Apple/GNUstep: 
> 
> #ifndef GNU_RUNTIME /* NeXT RUNTIME */ 
>  
> #define EDObjcMsgSend(obj, sel) objc_msgSend((obj), (sel)) 
> #define EDObjcMsgSend1(obj, sel, obj1) objc_msgSend((obj), (sel), 
> (obj1)) 
> #define EDObjcMsgSend2(obj, sel, obj1, obj2) objc_msgSend((obj), (sel), 
> (obj1), (obj2)) 
> #define EDObjcMsgSend3(obj, sel, obj1, obj2, obj3) objc_msgSend((obj), 
> (sel), (obj1), (obj2), (obj3)) 
>  
> #else /* GNU_RUNTIME */ 
>  
> #define EDObjcMsgSend(obj, sel) objc_msg_lookup((obj), (sel))((obj), 
> (sel)) 
> #define EDObjcMsgSend1(obj, sel, obj1) objc_msg_lookup((obj), 
> (sel))((obj), (sel), (obj1)) 
> #define EDObjcMsgSend2(obj, sel, obj1, obj2) objc_msg_lookup((obj), 
> (sel))((obj), (sel), (obj1), (obj2)) 
> #define EDObjcMsgSend3(obj, sel, obj1, obj2, obj3) 
> objc_msg_lookup((obj), (sel))((obj), (sel), (obj1), (obj2), (obj3)) 
>  
> #endif 
>  

Ok, thanks, but then, in the GNU case, you have to be careful of the
side effects lest you should lose performance or more evil things
happen. In this special case it was

 objc_msgSend([objects objectAtIndex: i], selector, argument)

which after expansion will search the array twice.

> > I had to modify the queueing mechanisms of EODelayedObserverQueue 
> > because it was broken.  Will post a bug report. 
> > 
>  
> That sounds strange, because it definitely works on OS X. 
> MulleEOInterface is used in a commercial application for several years 
> now. It's most probably a GNUstep related issue I think. 

Why, yes, of course!  EODelayedObserverQueue is part of EOControl,
not EOInterface.  I was talking about the implementation in GDL2.

> > As I don't have access to a Cocoa system, I don't know if it still 
> > compiles there.  Can I simply replace #import by #include with 
> > #ifndef-protection there as well? 
> > 
>  
> Yes, sure. The only exception are system framework headers (Foundation, 
> AppKit) as Apple doesn't provide 'safeguarding' for these. 

Is this the case for EOControl/EOAccess, too?
Hmm... can I use the macro GNU_RUNTIME above to distinguish the
cases when I'll have to use #import and when #include will work?

Cheers, Dirk.




reply via email to

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