bugGNUstep - Bugs: bug #36518, It's impossible to use GSWeb from...

Group
 
 

bug #36518: It's impossible to use GSWeb from Obj-C++ code

Submitter:  Graham Lee <leeg>
Submitted:  Mon 21 May 2012 04:25:21 PM UTC
   
 
Category:  gsweb Severity:  3 - Normal
Item Group:  Bug Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 21 Dec 2013 07:15:42 AM UTC, comment #1: 

Do you still have the patch around that you can attach it here as a file?

Sebastian Reitenbach <buzzdee>
Group Member
Mon 21 May 2012 04:25:21 PM UTC, original submission:  

The fix is simply to rename variables named as C++ keywords like "class" from the public header files - private headers and implementations don't need to be changed.


Index: GSWeb/GSWAction.h
===================================================================
--- GSWeb/GSWAction.h (revision 35157)
+++ GSWeb/GSWAction.h (working copy)
@@ -49,7 +49,7 @@
 +(BOOL)_isActionNamed:(NSString*)actionName
         actionOfClass:(Class)actionClass;
 +(SEL)_selectorForActionNamed:(NSString*)actionName
-                      inClass:(Class)class;
+                      inClass:(Class)actionClass;
 -(SEL)_selectorForActionNamed:(NSString*)actionName;
 -(id <GSWActionResults>)performActionNamed:(NSString*)actionName;
 
Index: GSWeb/GSWDynamicElement.h
===================================================================
--- GSWeb/GSWDynamicElement.h (revision 35157)
+++ GSWeb/GSWDynamicElement.h (working copy)
@@ -33,6 +33,9 @@
  #define GSWDynamicElement_h_
 
 #import "GSWElement.h"
+#if _OBJC2_
+#include <objc/runtime.h>
+#endif
 
 GSWEB_EXPORT SEL evaluateConditionInContextSEL;
 
@@ -43,7 +46,7 @@
 
 -(id)initWithName:(NSString*)name
      associations:(NSDictionary*)associations
-         template:(GSWElement*)template;
+         template:(GSWElement*)aTemplate;
 
 -(BOOL) evaluateCondition:(id)condition
                         inContext:(GSWContext*)context
Index: GSWeb/GSWString.h
===================================================================
--- GSWeb/GSWString.h (revision 35157)
+++ GSWeb/GSWString.h (working copy)
@@ -46,7 +46,7 @@
 
 -(id)initWithName:(NSString*)name
      associations:(NSMutableDictionary*)associations
-         template:(GSWElement*)template;
+         template:(GSWElement*)aTemplate;
 
 -(void)appendToResponse:(GSWResponse*)response
               inContext:(GSWContext*)context;
Index: GSWeb/GSWUtils.h
===================================================================
--- GSWeb/GSWUtils.h (revision 35157)
+++ GSWeb/GSWUtils.h (working copy)
@@ -297,7 +297,7 @@
 
 GSWEB_EXPORT BOOL
 loggedLockBeforeDateFromFunctionInFileInLine(id self,
-      BOOL try,
+      BOOL tryLock,
       NSDate *limit,
       const char *file,
       const char *function,
Index: GSWeb/GSWHTMLURLValuedElement.h
===================================================================
--- GSWeb/GSWHTMLURLValuedElement.h (revision 35157)
+++ GSWeb/GSWHTMLURLValuedElement.h (working copy)
@@ -51,7 +51,7 @@
 
 -(id)initWithName:(NSString*)aName
      associations:(NSDictionary*)associations
-         template:(GSWElement*)template;
+         template:(GSWElement*)aTemplate;
 
 -(NSString*)valueAttributeName;
 -(NSString*)urlAttributeName;
Index: GSWeb/GSWComponentReference.h
===================================================================
--- GSWeb/GSWComponentReference.h (revision 35157)
+++ GSWeb/GSWComponentReference.h (working copy)
@@ -48,7 +48,7 @@
 
 -(id)initWithName:(NSString*)aName
      associations:(NSDictionary*)associations
-         template:(GSWElement*)template;
+         template:(GSWElement*)aTemplate;
 -(NSString*)description;
 
 -(void)popRefComponentInContext:(GSWContext*)aContext;
Index: GSWeb/GSWImage.h
===================================================================
--- GSWeb/GSWImage.h (revision 35157)
+++ GSWeb/GSWImage.h (working copy)
@@ -41,7 +41,7 @@
 }
 -(id)initWithName:(NSString*)name
      associations:(NSDictionary*)associations
-         template:(GSWElement*)template;
+         template:(GSWElement*)aTemplate;
 
 -(NSString*)valueAttributeName;
 -(NSString*)urlAttributeName;
Index: GSWeb/GSWComponentDefinition.h
===================================================================
--- GSWeb/GSWComponentDefinition.h (revision 35157)
+++ GSWeb/GSWComponentDefinition.h (working copy)
@@ -104,7 +104,7 @@
                        languages:(NSArray*)languages;
 
 - (GSWComponentReference*) componentReferenceWithAssociations:(NSDictionary*)associations
-                                                     template:(GSWElement*)template;
+                                                     template:(GSWElement*)aTemplate;
                       
 -(NSDictionary*)componentAPI;
 
Index: GSWeb/GSWAssociation.h
===================================================================
--- GSWeb/GSWAssociation.h (revision 35157)
+++ GSWeb/GSWAssociation.h (working copy)
@@ -93,10 +93,10 @@
 -(NSString*)declarationName;
 -(NSString*)declarationType;
 
-+(void)setClasse:(Class)class
++(void)setClasse:(Class)classe
       forHandler:(NSString*)handler;
-+(void)addLogHandlerClasse:(Class)class;
-+(void)removeLogHandlerClasse:(Class)class;
++(void)addLogHandlerClasse:(Class)classe;
++(void)removeLogHandlerClasse:(Class)classe;
 
 +(GSWAssociation*)associationWithValue:(id)value;
 +(GSWAssociation*)associationWithKeyPath:(NSString*)keyPath;
Index: GSWeb/GSWTemporaryElement.h
===================================================================
--- GSWeb/GSWTemporaryElement.h (revision 35157)
+++ GSWeb/GSWTemporaryElement.h (working copy)
@@ -92,7 +92,7 @@
 -(GSWElement*)_elementWithDeclaration:(GSWDeclaration*)declaration
                                  name:(NSString*)name
                            properties:(NSDictionary*)properties
-                             template:(GSWElement*)template
+                             template:(GSWElement*)aTemplate
                             languages:(NSArray*)languages;
 
 @end
Index: GSWeb/GSWDynamicGroup.h
===================================================================
--- GSWeb/GSWDynamicGroup.h (revision 35157)
+++ GSWeb/GSWDynamicGroup.h (working copy)
@@ -42,7 +42,7 @@
 
 -(id)initWithName:(NSString*)name
      associations:(NSDictionary*)associations
-         template:(GSWElement*)template;
+         template:(GSWElement*)aTemplate;
         
 
 -(id)initWithName:(NSString*) name
Index: GSWeb/GSWHTMLStaticElement.h
===================================================================
--- GSWeb/GSWHTMLStaticElement.h (revision 35157)
+++ GSWeb/GSWHTMLStaticElement.h (working copy)
@@ -104,7 +104,7 @@
               contentElements:(NSArray*)elements;
 
 +(Class)_elementClassForName:(NSString*)name;
-+(void)setElementClass:(Class)class
++(void)setElementClass:(Class)classe
                forName:(NSString*)name;
 +(GSWElement*)_theEmptyElement;
 
Index: GSWeb/GSWActionURL.h
===================================================================
--- GSWeb/GSWActionURL.h (revision 35157)
+++ GSWeb/GSWActionURL.h (working copy)
@@ -35,7 +35,7 @@
 @interface GSWActionURL: GSWHyperlink
 -(id)initWithName:(NSString*)name
      associations:(NSDictionary*)associations
-         template:(GSWElement*)template;
+         template:(GSWElement*)aTemplate;
 
 @end
 
Index: GSWeb/GSWComponent.h
===================================================================
--- GSWeb/GSWComponent.h (revision 35157)
+++ GSWeb/GSWComponent.h (working copy)
@@ -95,7 +95,7 @@
 
 -(void) _setParent:(GSWComponent*) parent
       associations:(NSMutableDictionary *) assocdict
-          template:(GSWElement*) template;
+          template:(GSWElement*) aTemplate;
 
 -(void) pushValuesToParent;

Graham Lee <leeg>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by buzzdee (Posted a comment)
  • -email is unavailable- added by leeg (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code