Changeset 16233

Show
Ignore:
Timestamp:
09/05/06 13:13:12 (4 years ago)
Author:
thatcher
Message:

Reviewed by Tim O.

< rdar://problem/4715840> SEL is not char*

  • bindings/objc/objc_class.mm: (KJS::Bindings::ObjcClass::methodsNamed): use sel_getName instead of a char* cast.
  • bindings/objc/objc_runtime.mm: (ObjcFallbackObjectImp::callAsFunction): ditto
Location:
trunk/JavaScriptCore
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r16200 r16233  
     12006-09-05  Timothy Hatcher  <timothy@apple.com> 
     2 
     3        Reviewed by Tim O. 
     4 
     5        <rdar://problem/4715840> SEL is not char* 
     6 
     7        * bindings/objc/objc_class.mm: 
     8        (KJS::Bindings::ObjcClass::methodsNamed): use sel_getName instead of a char* cast. 
     9        * bindings/objc/objc_runtime.mm: 
     10        (ObjcFallbackObjectImp::callAsFunction): ditto 
     11 
    1122006-09-03  Alexey Proskuryakov  <ap@nypop.com> 
    213 
  • trunk/JavaScriptCore/bindings/objc/objc_class.mm

    r15969 r16233  
    120120                MethodStructPtr objcMethod = objcMethodList[i]; 
    121121                SEL objcMethodSelector = method_getName(objcMethod); 
    122                 const char* objcMethodSelectorName = sel_getName(objcMethodSelector); 
    123122#else 
    124123                struct objc_method* objcMethod = &objcMethodList->method_list[i]; 
    125124                SEL objcMethodSelector = objcMethod->method_name; 
    126                 const char* objcMethodSelectorName = (const char*)objcMethodSelector; 
    127 #endif 
     125#endif 
     126                const char* objcMethodSelectorName = sel_getName(objcMethodSelector); 
    128127                NSString* mappedName = nil; 
    129128 
  • trunk/JavaScriptCore/bindings/objc/objc_runtime.mm

    r15781 r16233  
    286286            MethodList methodList; 
    287287            ObjcClass* objcClass = static_cast<ObjcClass*>(instance->getClass()); 
    288             ObjcMethod* fallbackMethod = new ObjcMethod (objcClass->isa(), (const char*)@selector(invokeUndefinedMethodFromWebScript:withArguments:)); 
     288            ObjcMethod* fallbackMethod = new ObjcMethod (objcClass->isa(), sel_getName(@selector(invokeUndefinedMethodFromWebScript:withArguments:))); 
    289289            fallbackMethod->setJavaScriptName((CFStringRef)[NSString stringWithCString:_item.ascii() encoding:NSASCIIStringEncoding]); 
    290290            methodList.addMethod ((Method*)fallbackMethod);