
Index: lookup.h
===================================================================
--- lookup.h	(Revision 506639)
+++ lookup.h	(Arbeitskopie)
@@ -265,8 +265,10 @@
  * that cached object. Note that the object constructor must take 1 argument, exec.
  */
 template <class ClassCtor>
-inline KJS::JSObject *cacheGlobalObject(KJS::ExecState *exec, const KJS::Identifier &propertyName)
+struct cacheGlobal
 {
+  static inline KJS::JSObject *Object(KJS::ExecState *exec, const KJS::Identifier &propertyName)
+  {
   KJS::JSObject *globalObject = static_cast<KJS::JSObject *>(exec->lexicalInterpreter()->globalObject());
   KJS::JSValue *obj = globalObject->getDirect(propertyName);
   if (obj) {
@@ -277,6 +279,7 @@
   globalObject->put(exec, propertyName, newObject, KJS::Internal);
   return newObject;
 }
+};
 
 /**
  * Helpers to define prototype objects (each of which simply implements
@@ -296,7 +299,7 @@
  */
 #define KJS_DEFINE_PROTOTYPE(ClassProto) \
   class ClassProto : public KJS::JSObject { \
-    friend KJS::JSObject *cacheGlobalObject<ClassProto>(KJS::ExecState *exec, const KJS::Identifier &propertyName); \
+    friend struct cacheGlobal<ClassProto>; \
   public: \
     static KJS::JSObject *self(KJS::ExecState *exec); \
     virtual const KJS::ClassInfo *classInfo() const { return &info; } \
@@ -315,7 +318,7 @@
     Identifier* ClassProto::s_name = 0; \
     JSObject *ClassProto::self(ExecState *exec) \
     { \
-      return cacheGlobalObject<ClassProto>(exec, *name()); \
+      return cacheGlobal<ClassProto>::Object(exec, *name()); \
     } \
     bool ClassProto::getOwnPropertySlot(ExecState *exec, const Identifier& propertyName, PropertySlot& slot) \
     { \
@@ -332,7 +335,7 @@
     Identifier* ClassProto::s_name = 0; \
     JSObject *ClassProto::self(ExecState *exec) \
     { \
-      return cacheGlobalObject<ClassProto>(exec, *name()); \
+      return cacheGlobal<ClassProto>::Object(exec, *name()); \
     } \
     bool ClassProto::getOwnPropertySlot(ExecState *exec, const Identifier& propertyName, PropertySlot& slot) \
     { \
