discuss-gnustep
[Top][All Lists]
Advanced

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

Re: MulleEOInterface


From: Marcus Müller
Subject: Re: MulleEOInterface
Date: Sun, 25 May 2003 15:32:56 +0200


On Saturday, May 24, 2003, at 19:35 Europe/Berlin, Dirk Lattermann wrote:


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.

Oh, yes, certainly. That's the general problem with macros, however.


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

Bummer. Sorry for my ignorance. ;-)

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?

Well, that's a bit quirky. Strictly speaking it's the same for EOControl/EOAccess, too. But who (besides a few running WO4.51) has a copy of EOF running on OSX these days?

I defined GNU_RUNTIME like this in GNUMakefile of EDCommon:

--- snip ---
ifeq "$(OBJC_RUNTIME_LIB)" "gnu"
ADDITIONAL_OBJCFLAGS += -DGNU_RUNTIME
endif
--- snap ---

My feelings about the #import issue are quite mixed. Because we're working on cross-platform frameworks/projects I use #include wherever that's feasible but still use #import for all of { Foundation, AppKit, EO* }. I also turn of warnings about #import usage when configuring the GNUstep make package because I'm well aware of the issue on don't need to be reminded about it. ;-)


Cheers,

  Marcus

--
Marcus Mueller  .  .  .  crack-admin/coder ;-)
Mulle kybernetiK  .  http://www.mulle-kybernetik.com
Current projects: finger znek@mulle-kybernetik.com





reply via email to

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