Commit e83e7f4c authored by thatcher's avatar thatcher
Browse files

Reviewed by Sam Weinig.

        Remove the OBJC_NEW_PROPERTIES #ifdef and only export the new @property syntax.

        * bindings/objc/DOMObject.h:
        * bindings/scripts/CodeGeneratorObjC.pm:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@21718 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent deaa7704
2007-05-24 Timothy Hatcher <timothy@apple.com>
Reviewed by Sam Weinig.
Remove the OBJC_NEW_PROPERTIES #ifdef and only export the new @property syntax.
* bindings/objc/DOMObject.h:
* bindings/scripts/CodeGeneratorObjC.pm:
2007-05-24 Sam Weinig <sam@webkit.org> 2007-05-24 Sam Weinig <sam@webkit.org>
   
Reviewed by Anders. Reviewed by Anders.
...@@ -41,12 +41,8 @@ typedef struct DOMObjectInternal DOMObjectInternal; ...@@ -41,12 +41,8 @@ typedef struct DOMObjectInternal DOMObjectInternal;
@interface DOMObject (DOMLinkStyle) @interface DOMObject (DOMLinkStyle)
#ifndef BUILDING_ON_TIGER #ifndef BUILDING_ON_TIGER
#ifdef OBJC_NEW_PROPERTIES
@property(readonly, retain) DOMStyleSheet *sheet; @property(readonly, retain) DOMStyleSheet *sheet;
#else #else
@property(readonly) DOMStyleSheet *sheet;
#endif
#else
- (DOMStyleSheet *)sheet; - (DOMStyleSheet *)sheet;
#endif #endif
@end @end
...@@ -711,9 +711,6 @@ sub GenerateHeader ...@@ -711,9 +711,6 @@ sub GenerateHeader
my @headerAttributes = (); my @headerAttributes = ();
my @privateHeaderAttributes = (); my @privateHeaderAttributes = ();
my @headerAttributesOldStyle = ();
my @privateHeaderAttributesOldStyle = ();
# - Add attribute getters/setters. # - Add attribute getters/setters.
if ($numAttributes > 0) { if ($numAttributes > 0) {
# Add ivars, if any, first # Add ivars, if any, first
...@@ -773,12 +770,6 @@ sub GenerateHeader ...@@ -773,12 +770,6 @@ sub GenerateHeader
$property .= "\n"; $property .= "\n";
push(@headerAttributes, $property) if $public; push(@headerAttributes, $property) if $public;
push(@privateHeaderAttributes, $property) unless $public; push(@privateHeaderAttributes, $property) unless $public;
my $oldStyleProperty = "\@property" . ($attributeIsReadonly ? "(readonly)" : "");
$oldStyleProperty .= " " . $attributeType . ($attributeType =~ /\*$/ ? "" : " ") . $attributeName . ";\n";
push(@headerAttributesOldStyle, $oldStyleProperty) if $public;
push(@privateHeaderAttributesOldStyle, $oldStyleProperty) unless $public;
} else { } else {
# - GETTER # - GETTER
my $getter = "- (" . $attributeType . ")" . $attributeName . ";\n"; my $getter = "- (" . $attributeType . ")" . $attributeName . ";\n";
...@@ -794,11 +785,7 @@ sub GenerateHeader ...@@ -794,11 +785,7 @@ sub GenerateHeader
} }
} }
push(@headerContent, "#ifdef OBJC_NEW_PROPERTIES\n") if $buildingForLeopardOrLater;
push(@headerContent, @headerAttributes) if @headerAttributes > 0; push(@headerContent, @headerAttributes) if @headerAttributes > 0;
push(@headerContent, "#else\n") if $buildingForLeopardOrLater;
push(@headerContent, @headerAttributesOldStyle) if @headerAttributesOldStyle > 0 and $buildingForLeopardOrLater;
push(@headerContent, "#endif\n") if $buildingForLeopardOrLater;
} }
my @headerFunctions = (); my @headerFunctions = ();
...@@ -914,11 +901,7 @@ sub GenerateHeader ...@@ -914,11 +901,7 @@ sub GenerateHeader
@privateHeaderContent = (); @privateHeaderContent = ();
push(@privateHeaderContent, "\@interface $className (" . $className . "Private)\n"); push(@privateHeaderContent, "\@interface $className (" . $className . "Private)\n");
push(@privateHeaderContent, "#ifdef OBJC_NEW_PROPERTIES\n") if $buildingForLeopardOrLater;
push(@privateHeaderContent, @privateHeaderAttributes) if @privateHeaderAttributes > 0; push(@privateHeaderContent, @privateHeaderAttributes) if @privateHeaderAttributes > 0;
push(@privateHeaderContent, "#else\n") if $buildingForLeopardOrLater;
push(@privateHeaderContent, @privateHeaderAttributesOldStyle) if @privateHeaderAttributesOldStyle > 0 and $buildingForLeopardOrLater;
push(@privateHeaderContent, "#endif\n") if $buildingForLeopardOrLater;
push(@privateHeaderContent, "\n") if $buildingForLeopardOrLater and @privateHeaderAttributes > 0 and @privateHeaderFunctions > 0; push(@privateHeaderContent, "\n") if $buildingForLeopardOrLater and @privateHeaderAttributes > 0 and @privateHeaderFunctions > 0;
push(@privateHeaderContent, @privateHeaderFunctions) if @privateHeaderFunctions > 0; push(@privateHeaderContent, @privateHeaderFunctions) if @privateHeaderFunctions > 0;
push(@privateHeaderContent, "\@end\n"); push(@privateHeaderContent, "\@end\n");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment