Ignore:
Timestamp:
Jan 23, 2007, 2:23:09 PM (18 years ago)
Author:
ggaren
Message:

Reviewed by Maciej Stachowiak.


Fixed <rdar://problem/4885131> Move CFString function declarations from
JSStringRef.h to JSStringRefCF.h


Also removed remaining API FIXMEs and changed them into Radars.

  • API/JSClassRef.cpp: (OpaqueJSClass::OpaqueJSClass): Added Radar numbers for UTF8 conversion.
  • API/JSContextRef.cpp: (JSGlobalContextCreate): Replaced FIXME for NULL JSContextRef with Radar number.
  • API/JSObjectRef.h: Removed FIXME, which is unprofessional in a public header.
  • API/JSStringRef.cpp: Moved CF related implementations to JSStringRefCF.cpp. (JSStringCreateWithUTF8CString): Replaced FIXME with Radar number.
  • API/JSStringRef.h: Moved CF related declarations to JSStringRefCF.h. Added #include of JSStringRefCF.h as a stopgap until clients start #including it as needed by themselves.
  • API/JSStringRefCF.cpp: Added. (JSStringCreateWithCFString): (JSStringCopyCFString): Replaced JSChar cast with UniChar cast, which is more appropriate for a CF call.
  • API/JSStringRefCF.h: Added.
  • JavaScriptCore.xcodeproj/project.pbxproj:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/JSStringRef.h

    r15497 r19059  
    3535#ifdef __cplusplus
    3636extern "C" {
     37#endif
     38
     39#if defined(__APPLE__)
     40#include "JSStringRefCF.h"
    3741#endif
    3842
     
    137141bool JSStringIsEqualToUTF8CString(JSStringRef a, const char* b);
    138142
    139 #if defined(__APPLE__)
    140 #include <CoreFoundation/CoreFoundation.h>
    141 // CFString convenience methods
    142 /*!
    143 @function
    144 @abstract         Creates a JavaScript string from a CFString.
    145 @discussion       This function is optimized to take advantage of cases when
    146  CFStringGetCharactersPtr returns a valid pointer.
    147 @param string     The CFString to copy into the new JSString.
    148 @result           A JSString containing string. Ownership follows the Create Rule.
    149 */
    150 JSStringRef JSStringCreateWithCFString(CFStringRef string);
    151 /*!
    152 @function
    153 @abstract         Creates a CFString from a JavaScript string.
    154 @param alloc      The alloc parameter to pass to CFStringCreate.
    155 @param string     The JSString to copy into the new CFString.
    156 @result           A CFString containing string. Ownership follows the Create Rule.
    157 */
    158 CFStringRef JSStringCopyCFString(CFAllocatorRef alloc, JSStringRef string);
    159 #endif // __APPLE__
    160    
    161143#ifdef __cplusplus
    162144}
Note: See TracChangeset for help on using the changeset viewer.