APPLE_CHANGES, namespace directives
Harri Porten
porten@trolltech.com
Thu, 9 Jan 2003 23:03:27 +0100 (CET)
Hi !
On Thu, 9 Jan 2003, Darin Adler wrote:
> In JavaScriptCore, I think the situation is different. There are very
> few Apple-specific changes in JavaScriptCore, and I could imagine
> actually checking those in to the real KJS tree and having
> JavaScriptCore and KJS being 100% identical, although we might choose
> some other identifier or identifiers to do the ifdefs other than
> APPLE_CHANGES.
I think so, too. After we resolve what's going to happen with the Date
object there's not much left. The locking code could be guarded by
KJS_THREAD_SUPPORT or so.
> 2) Why the change to "namespace DOM {" instead of "using namespace DOM"
> in .cpp files?
>
> We had to make this change in some files because of identifier
> conflicts between identifiers in the DOM namespace and identifiers in
> the global namespace. I can't remember which it identifier was
> off-hand, but I was happy to find this simple way to fix it.
I saw several of those myself when working on khtml/ecma files as the
wrapper classes often have the same name as the khtml classes. Things
varied with the compiler being used.
> Anyone with a Mac OS X development machine can just change the file
> back, recompile WebCore and you'll immediately see the compiler error.
It would be interesting to know. Hasn't the default compiler for Mac OS X
being updated ? Maybe the problem is gone or at least different now. If
the number of explicit DOM:: prefixing required is not too high we could
easily patch the sources in KDE CVS.
Harri.