Changeset 28097 in webkit


Ignore:
Timestamp:
Nov 27, 2007 8:31:51 PM (16 years ago)
Author:
alp@webkit.org
Message:

2007-11-27 Alp Toker <alp@atoker.com>

Reviewed by Maciej.

http://bugs.webkit.org/show_bug.cgi?id=15569
[gtk] GTK JavaScriptCore needs to export symbols for JSC API and WTF

Introduce JS_EXPORT to mark symbols to be exported as public API.

Export all public symbols in the JavaScriptCore C API.

This matches conventions for exporting symbols set by the CF and CG
frameworks.

  • API/JSBase.h:
  • API/JSContextRef.h:
  • API/JSObjectRef.h:
  • API/JSStringRef.h:
  • API/JSStringRefBSTR.h:
  • API/JSStringRefCF.h:
  • API/JSValueRef.h:
Location:
trunk/JavaScriptCore
Files:
8 edited

Legend:

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

    r23802 r28097  
    5959typedef struct OpaqueJSValue* JSObjectRef;
    6060
     61/* JavaScript symbol exports */
     62
     63#undef JS_EXPORT
     64#if defined(WIN32) || defined(_WIN32)
     65    #if defined(JS_BUILDING_JS)
     66        #define JS_EXPORT __declspec(dllexport) extern
     67    #else
     68        #define JS_EXPORT __declspec(dllimport) extern
     69    #endif
     70#elif defined(__GNUC__)
     71    #define JS_EXPORT __attribute__((visibility("default")))
     72#else
     73    #define JS_EXPORT extern
     74#endif
     75
    6176#ifdef __cplusplus
    6277extern "C" {
     
    7691@result The JSValue that results from evaluating script, or NULL if an exception is thrown.
    7792*/
    78 JSValueRef JSEvaluateScript(JSContextRef ctx, JSStringRef script, JSObjectRef thisObject, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception);
     93JS_EXPORT JSValueRef JSEvaluateScript(JSContextRef ctx, JSStringRef script, JSObjectRef thisObject, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception);
    7994
    8095/*!
     
    88103@result true if the script is syntactically correct, otherwise false.
    89104*/
    90 bool JSCheckScriptSyntax(JSContextRef ctx, JSStringRef script, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception);
     105JS_EXPORT bool JSCheckScriptSyntax(JSContextRef ctx, JSStringRef script, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception);
    91106
    92107/*!
     
    104119 JSGlobalContextRef's global object, along with the global object itself.
    105120*/
    106 void JSGarbageCollect(JSContextRef ctx);
     121JS_EXPORT void JSGarbageCollect(JSContextRef ctx);
    107122
    108123#ifdef __cplusplus
  • trunk/JavaScriptCore/API/JSContextRef.h

    r15481 r28097  
    4646@result A JSGlobalContext with a global object of class globalObjectClass.
    4747*/
    48 JSGlobalContextRef JSGlobalContextCreate(JSClassRef globalObjectClass);
     48JS_EXPORT JSGlobalContextRef JSGlobalContextCreate(JSClassRef globalObjectClass);
    4949
    5050/*!
     
    5454@result A JSGlobalContext that is the same as ctx.
    5555*/
    56 JSGlobalContextRef JSGlobalContextRetain(JSGlobalContextRef ctx);
     56JS_EXPORT JSGlobalContextRef JSGlobalContextRetain(JSGlobalContextRef ctx);
    5757
    5858/*!
     
    6161@param ctx The JSGlobalContext to release.
    6262*/
    63 void JSGlobalContextRelease(JSGlobalContextRef ctx);
     63JS_EXPORT void JSGlobalContextRelease(JSGlobalContextRef ctx);
    6464
    6565/*!
     
    6969@result ctx's global object.
    7070*/
    71 JSObjectRef JSContextGetGlobalObject(JSContextRef ctx);
     71JS_EXPORT JSObjectRef JSContextGetGlobalObject(JSContextRef ctx);
    7272
    7373#ifdef __cplusplus
  • trunk/JavaScriptCore/API/JSObjectRef.h

    r24809 r28097  
    377377@result A JSClass with the given definition. Ownership follows the Create Rule.
    378378*/
    379 JSClassRef JSClassCreate(const JSClassDefinition* definition);
     379JS_EXPORT JSClassRef JSClassCreate(const JSClassDefinition* definition);
    380380
    381381/*!
     
    385385@result A JSClass that is the same as jsClass.
    386386*/
    387 JSClassRef JSClassRetain(JSClassRef jsClass);
     387JS_EXPORT JSClassRef JSClassRetain(JSClassRef jsClass);
    388388
    389389/*!
     
    392392@param jsClass The JSClass to release.
    393393*/
    394 void JSClassRelease(JSClassRef jsClass);
     394JS_EXPORT void JSClassRelease(JSClassRef jsClass);
    395395
    396396/*!
     
    405405data is set on the created object before the intialize methods in its class chain are called. This enables the initialize methods to retrieve and manipulate data through JSObjectGetPrivate.
    406406*/
    407 JSObjectRef JSObjectMake(JSContextRef ctx, JSClassRef jsClass, void* data);
     407JS_EXPORT JSObjectRef JSObjectMake(JSContextRef ctx, JSClassRef jsClass, void* data);
    408408
    409409/*!
     
    415415@result A JSObject that is a function. The object's prototype will be the default function prototype.
    416416*/
    417 JSObjectRef JSObjectMakeFunctionWithCallback(JSContextRef ctx, JSStringRef name, JSObjectCallAsFunctionCallback callAsFunction);
     417JS_EXPORT JSObjectRef JSObjectMakeFunctionWithCallback(JSContextRef ctx, JSStringRef name, JSObjectCallAsFunctionCallback callAsFunction);
    418418
    419419/*!
     
    426426@discussion The default object constructor takes no arguments and constructs an object of class jsClass with no private data.
    427427*/
    428 JSObjectRef JSObjectMakeConstructor(JSContextRef ctx, JSClassRef jsClass, JSObjectCallAsConstructorCallback callAsConstructor);
     428JS_EXPORT JSObjectRef JSObjectMakeConstructor(JSContextRef ctx, JSClassRef jsClass, JSObjectCallAsConstructorCallback callAsConstructor);
    429429
    430430/*!
     
    442442@discussion Use this method when you want to execute a script repeatedly, to avoid the cost of re-parsing the script before each execution.
    443443*/
    444 JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned parameterCount, const JSStringRef parameterNames[], JSStringRef body, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception);
     444JS_EXPORT JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned parameterCount, const JSStringRef parameterNames[], JSStringRef body, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception);
    445445
    446446/*!
     
    451451@result A JSValue that is the object's prototype.
    452452*/
    453 JSValueRef JSObjectGetPrototype(JSContextRef ctx, JSObjectRef object);
     453JS_EXPORT JSValueRef JSObjectGetPrototype(JSContextRef ctx, JSObjectRef object);
    454454
    455455/*!
     
    460460@param value A JSValue to set as the object's prototype.
    461461*/
    462 void JSObjectSetPrototype(JSContextRef ctx, JSObjectRef object, JSValueRef value);
     462JS_EXPORT void JSObjectSetPrototype(JSContextRef ctx, JSObjectRef object, JSValueRef value);
    463463
    464464/*!
     
    469469@result true if the object has a property whose name matches propertyName, otherwise false.
    470470*/
    471 bool JSObjectHasProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName);
     471JS_EXPORT bool JSObjectHasProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName);
    472472
    473473/*!
     
    480480@result The property's value if object has the property, otherwise the undefined value.
    481481*/
    482 JSValueRef JSObjectGetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);
     482JS_EXPORT JSValueRef JSObjectGetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);
    483483
    484484/*!
     
    492492@param attributes A logically ORed set of JSPropertyAttributes to give to the property.
    493493*/
    494 void JSObjectSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSPropertyAttributes attributes, JSValueRef* exception);
     494JS_EXPORT void JSObjectSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSPropertyAttributes attributes, JSValueRef* exception);
    495495
    496496/*!
     
    503503@result true if the delete operation succeeds, otherwise false (for example, if the property has the kJSPropertyAttributeDontDelete attribute set).
    504504*/
    505 bool JSObjectDeleteProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);
     505JS_EXPORT bool JSObjectDeleteProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);
    506506
    507507/*!
     
    515515@discussion Calling JSObjectGetPropertyAtIndex is equivalent to calling JSObjectGetProperty with a string containing propertyIndex, but JSObjectGetPropertyAtIndex provides optimized access to numeric properties.
    516516*/
    517 JSValueRef JSObjectGetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef* exception);
     517JS_EXPORT JSValueRef JSObjectGetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef* exception);
    518518
    519519/*!
     
    527527@discussion Calling JSObjectSetPropertyAtIndex is equivalent to calling JSObjectSetProperty with a string containing propertyIndex, but JSObjectSetPropertyAtIndex provides optimized access to numeric properties.
    528528*/
    529 void JSObjectSetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef value, JSValueRef* exception);
     529JS_EXPORT void JSObjectSetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef value, JSValueRef* exception);
    530530
    531531/*!
     
    535535@result A void* that is the object's private data, if the object has private data, otherwise NULL.
    536536*/
    537 void* JSObjectGetPrivate(JSObjectRef object);
     537JS_EXPORT void* JSObjectGetPrivate(JSObjectRef object);
    538538
    539539/*!
     
    545545@discussion The default object class does not allocate storage for private data. Only objects created with a non-NULL JSClass can store private data.
    546546*/
    547 bool JSObjectSetPrivate(JSObjectRef object, void* data);
     547JS_EXPORT bool JSObjectSetPrivate(JSObjectRef object, void* data);
    548548
    549549/*!
     
    554554@result true if the object can be called as a function, otherwise false.
    555555*/
    556 bool JSObjectIsFunction(JSContextRef ctx, JSObjectRef object);
     556JS_EXPORT bool JSObjectIsFunction(JSContextRef ctx, JSObjectRef object);
    557557
    558558/*!
     
    567567@result The JSValue that results from calling object as a function, or NULL if an exception is thrown or object is not a function.
    568568*/
    569 JSValueRef JSObjectCallAsFunction(JSContextRef ctx, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
     569JS_EXPORT JSValueRef JSObjectCallAsFunction(JSContextRef ctx, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
    570570
    571571/*!
     
    576576@result true if the object can be called as a constructor, otherwise false.
    577577*/
    578 bool JSObjectIsConstructor(JSContextRef ctx, JSObjectRef object);
     578JS_EXPORT bool JSObjectIsConstructor(JSContextRef ctx, JSObjectRef object);
    579579
    580580/*!
     
    588588@result The JSObject that results from calling object as a constructor, or NULL if an exception is thrown or object is not a constructor.
    589589*/
    590 JSObjectRef JSObjectCallAsConstructor(JSContextRef ctx, JSObjectRef object, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
     590JS_EXPORT JSObjectRef JSObjectCallAsConstructor(JSContextRef ctx, JSObjectRef object, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
    591591
    592592/*!
     
    597597@result A JSPropertyNameArray containing the names object's enumerable properties.
    598598*/
    599 JSPropertyNameArrayRef JSObjectCopyPropertyNames(JSContextRef ctx, JSObjectRef object);
     599JS_EXPORT JSPropertyNameArrayRef JSObjectCopyPropertyNames(JSContextRef ctx, JSObjectRef object);
    600600
    601601/*!
     
    605605@result A JSPropertyNameArray that is the same as array.
    606606*/
    607 JSPropertyNameArrayRef JSPropertyNameArrayRetain(JSPropertyNameArrayRef array);
     607JS_EXPORT JSPropertyNameArrayRef JSPropertyNameArrayRetain(JSPropertyNameArrayRef array);
    608608
    609609/*!
     
    612612@param array The JSPropetyNameArray to release.
    613613*/
    614 void JSPropertyNameArrayRelease(JSPropertyNameArrayRef array);
     614JS_EXPORT void JSPropertyNameArrayRelease(JSPropertyNameArrayRef array);
    615615
    616616/*!
     
    620620@result An integer count of the number of names in array.
    621621*/
    622 size_t JSPropertyNameArrayGetCount(JSPropertyNameArrayRef array);
     622JS_EXPORT size_t JSPropertyNameArrayGetCount(JSPropertyNameArrayRef array);
    623623
    624624/*!
     
    629629@result A JSStringRef containing the property name.
    630630*/
    631 JSStringRef JSPropertyNameArrayGetNameAtIndex(JSPropertyNameArrayRef array, size_t index);
     631JS_EXPORT JSStringRef JSPropertyNameArrayGetNameAtIndex(JSPropertyNameArrayRef array, size_t index);
    632632
    633633/*!
     
    637637@param propertyName The property name to add.
    638638*/
    639 void JSPropertyNameAccumulatorAddName(JSPropertyNameAccumulatorRef accumulator, JSStringRef propertyName);
     639JS_EXPORT void JSPropertyNameAccumulatorAddName(JSPropertyNameAccumulatorRef accumulator, JSStringRef propertyName);
    640640
    641641#ifdef __cplusplus
  • trunk/JavaScriptCore/API/JSStringRef.h

    r24774 r28097  
    5454@result           A JSString containing chars. Ownership follows the Create Rule.
    5555*/
    56 JSStringRef JSStringCreateWithCharacters(const JSChar* chars, size_t numChars);
     56JS_EXPORT JSStringRef JSStringCreateWithCharacters(const JSChar* chars, size_t numChars);
    5757/*!
    5858@function
     
    6161@result           A JSString containing string. Ownership follows the Create Rule.
    6262*/
    63 JSStringRef JSStringCreateWithUTF8CString(const char* string);
     63JS_EXPORT JSStringRef JSStringCreateWithUTF8CString(const char* string);
    6464
    6565/*!
     
    6969@result           A JSString that is the same as string.
    7070*/
    71 JSStringRef JSStringRetain(JSStringRef string);
     71JS_EXPORT JSStringRef JSStringRetain(JSStringRef string);
    7272/*!
    7373@function
     
    7575@param string     The JSString to release.
    7676*/
    77 void JSStringRelease(JSStringRef string);
     77JS_EXPORT void JSStringRelease(JSStringRef string);
    7878
    7979/*!
     
    8383@result           The number of Unicode characters stored in string.
    8484*/
    85 size_t JSStringGetLength(JSStringRef string);
     85JS_EXPORT size_t JSStringGetLength(JSStringRef string);
    8686/*!
    8787@function
     
    9292 backing store, which will be deallocated when string is deallocated.
    9393*/
    94 const JSChar* JSStringGetCharactersPtr(JSStringRef string);
     94JS_EXPORT const JSChar* JSStringGetCharactersPtr(JSStringRef string);
    9595
    9696/*!
     
    104104 up requiring could be less than this, but never more.
    105105*/
    106 size_t JSStringGetMaximumUTF8CStringSize(JSStringRef string);
     106JS_EXPORT size_t JSStringGetMaximumUTF8CStringSize(JSStringRef string);
    107107/*!
    108108@function
     
    118118@result The number of bytes written into buffer (including the null-terminator byte).
    119119*/
    120 size_t JSStringGetUTF8CString(JSStringRef string, char* buffer, size_t bufferSize);
     120JS_EXPORT size_t JSStringGetUTF8CString(JSStringRef string, char* buffer, size_t bufferSize);
    121121
    122122/*!
     
    127127@result       true if the two strings match, otherwise false.
    128128*/
    129 bool JSStringIsEqual(JSStringRef a, JSStringRef b);
     129JS_EXPORT bool JSStringIsEqual(JSStringRef a, JSStringRef b);
    130130/*!
    131131@function
     
    135135@result       true if the two strings match, otherwise false.
    136136*/
    137 bool JSStringIsEqualToUTF8CString(JSStringRef a, const char* b);
     137JS_EXPORT bool JSStringIsEqualToUTF8CString(JSStringRef a, const char* b);
    138138
    139139#ifdef __cplusplus
  • trunk/JavaScriptCore/API/JSStringRefBSTR.h

    r27137 r28097  
    4747@result           A JSString containing string. Ownership follows the Create Rule.
    4848*/
    49 JSStringRef JSStringCreateWithBSTR(const BSTR string);
     49JS_EXPORT JSStringRef JSStringCreateWithBSTR(const BSTR string);
    5050
    5151/*!
     
    5555@result           A BSTR containing string. Ownership follows the Create Rule.
    5656*/
    57 BSTR JSStringCopyBSTR(const JSStringRef string);
     57JS_EXPORT BSTR JSStringCopyBSTR(const JSStringRef string);
    5858   
    5959#ifdef __cplusplus
  • trunk/JavaScriptCore/API/JSStringRefCF.h

    r19059 r28097  
    4545@result           A JSString containing string. Ownership follows the Create Rule.
    4646*/
    47 JSStringRef JSStringCreateWithCFString(CFStringRef string);
     47JS_EXPORT JSStringRef JSStringCreateWithCFString(CFStringRef string);
    4848/*!
    4949@function
     
    5353@result           A CFString containing string. Ownership follows the Create Rule.
    5454*/
    55 CFStringRef JSStringCopyCFString(CFAllocatorRef alloc, JSStringRef string);
     55JS_EXPORT CFStringRef JSStringCopyCFString(CFAllocatorRef alloc, JSStringRef string);
    5656   
    5757#ifdef __cplusplus
  • trunk/JavaScriptCore/API/JSValueRef.h

    r15497 r28097  
    6262@result         A value of type JSType that identifies value's type.
    6363*/
    64 JSType JSValueGetType(JSContextRef ctx, JSValueRef value);
     64JS_EXPORT JSType JSValueGetType(JSContextRef ctx, JSValueRef value);
    6565
    6666/*!
     
    7171@result         true if value's type is the undefined type, otherwise false.
    7272*/
    73 bool JSValueIsUndefined(JSContextRef ctx, JSValueRef value);
     73JS_EXPORT bool JSValueIsUndefined(JSContextRef ctx, JSValueRef value);
    7474
    7575/*!
     
    8080@result         true if value's type is the null type, otherwise false.
    8181*/
    82 bool JSValueIsNull(JSContextRef ctx, JSValueRef value);
     82JS_EXPORT bool JSValueIsNull(JSContextRef ctx, JSValueRef value);
    8383
    8484/*!
     
    8989@result         true if value's type is the boolean type, otherwise false.
    9090*/
    91 bool JSValueIsBoolean(JSContextRef ctx, JSValueRef value);
     91JS_EXPORT bool JSValueIsBoolean(JSContextRef ctx, JSValueRef value);
    9292
    9393/*!
     
    9898@result         true if value's type is the number type, otherwise false.
    9999*/
    100 bool JSValueIsNumber(JSContextRef ctx, JSValueRef value);
     100JS_EXPORT bool JSValueIsNumber(JSContextRef ctx, JSValueRef value);
    101101
    102102/*!
     
    107107@result         true if value's type is the string type, otherwise false.
    108108*/
    109 bool JSValueIsString(JSContextRef ctx, JSValueRef value);
     109JS_EXPORT bool JSValueIsString(JSContextRef ctx, JSValueRef value);
    110110
    111111/*!
     
    116116@result         true if value's type is the object type, otherwise false.
    117117*/
    118 bool JSValueIsObject(JSContextRef ctx, JSValueRef value);
     118JS_EXPORT bool JSValueIsObject(JSContextRef ctx, JSValueRef value);
    119119
    120120/*!
     
    126126@result true if value is an object and has jsClass in its class chain, otherwise false.
    127127*/
    128 bool JSValueIsObjectOfClass(JSContextRef ctx, JSValueRef value, JSClassRef jsClass);
     128JS_EXPORT bool JSValueIsObjectOfClass(JSContextRef ctx, JSValueRef value, JSClassRef jsClass);
    129129
    130130// Comparing values
     
    139139@result true if the two values are equal, false if they are not equal or an exception is thrown.
    140140*/
    141 bool JSValueIsEqual(JSContextRef ctx, JSValueRef a, JSValueRef b, JSValueRef* exception);
     141JS_EXPORT bool JSValueIsEqual(JSContextRef ctx, JSValueRef a, JSValueRef b, JSValueRef* exception);
    142142
    143143/*!
     
    149149@result         true if the two values are strict equal, otherwise false.
    150150*/
    151 bool JSValueIsStrictEqual(JSContextRef ctx, JSValueRef a, JSValueRef b);
     151JS_EXPORT bool JSValueIsStrictEqual(JSContextRef ctx, JSValueRef a, JSValueRef b);
    152152
    153153/*!
     
    160160@result true if value is an object constructed by constructor, as compared by the JS instanceof operator, otherwise false.
    161161*/
    162 bool JSValueIsInstanceOfConstructor(JSContextRef ctx, JSValueRef value, JSObjectRef constructor, JSValueRef* exception);
     162JS_EXPORT bool JSValueIsInstanceOfConstructor(JSContextRef ctx, JSValueRef value, JSObjectRef constructor, JSValueRef* exception);
    163163
    164164// Creating values
     
    170170@result         The unique undefined value.
    171171*/
    172 JSValueRef JSValueMakeUndefined(JSContextRef ctx);
     172JS_EXPORT JSValueRef JSValueMakeUndefined(JSContextRef ctx);
    173173
    174174/*!
     
    178178@result         The unique null value.
    179179*/
    180 JSValueRef JSValueMakeNull(JSContextRef ctx);
     180JS_EXPORT JSValueRef JSValueMakeNull(JSContextRef ctx);
    181181
    182182/*!
     
    187187@result         A JSValue of the boolean type, representing the value of boolean.
    188188*/
    189 JSValueRef JSValueMakeBoolean(JSContextRef ctx, bool boolean);
     189JS_EXPORT JSValueRef JSValueMakeBoolean(JSContextRef ctx, bool boolean);
    190190
    191191/*!
     
    196196@result         A JSValue of the number type, representing the value of number.
    197197*/
    198 JSValueRef JSValueMakeNumber(JSContextRef ctx, double number);
     198JS_EXPORT JSValueRef JSValueMakeNumber(JSContextRef ctx, double number);
    199199
    200200/*!
     
    206206@result         A JSValue of the string type, representing the value of string.
    207207*/
    208 JSValueRef JSValueMakeString(JSContextRef ctx, JSStringRef string);
     208JS_EXPORT JSValueRef JSValueMakeString(JSContextRef ctx, JSStringRef string);
    209209
    210210// Converting to primitive values
     
    217217@result         The boolean result of conversion.
    218218*/
    219 bool JSValueToBoolean(JSContextRef ctx, JSValueRef value);
     219JS_EXPORT bool JSValueToBoolean(JSContextRef ctx, JSValueRef value);
    220220
    221221/*!
     
    227227@result         The numeric result of conversion, or NaN if an exception is thrown.
    228228*/
    229 double JSValueToNumber(JSContextRef ctx, JSValueRef value, JSValueRef* exception);
     229JS_EXPORT double JSValueToNumber(JSContextRef ctx, JSValueRef value, JSValueRef* exception);
    230230
    231231/*!
     
    237237@result         A JSString with the result of conversion, or NULL if an exception is thrown. Ownership follows the Create Rule.
    238238*/
    239 JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef* exception);
     239JS_EXPORT JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef* exception);
    240240
    241241/*!
     
    247247@result         The JSObject result of conversion, or NULL if an exception is thrown.
    248248*/
    249 JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef* exception);
     249JS_EXPORT JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef* exception);
    250250
    251251// Garbage collection
     
    259259A value may be protected multiple times and must be unprotected an equal number of times before becoming eligible for garbage collection.
    260260*/
    261 void JSValueProtect(JSContextRef ctx, JSValueRef value);
     261JS_EXPORT void JSValueProtect(JSContextRef ctx, JSValueRef value);
    262262
    263263/*!
     
    269269 equal number of times before becoming eligible for garbage collection.
    270270*/
    271 void JSValueUnprotect(JSContextRef ctx, JSValueRef value);
     271JS_EXPORT void JSValueUnprotect(JSContextRef ctx, JSValueRef value);
    272272
    273273#ifdef __cplusplus
  • trunk/JavaScriptCore/ChangeLog

    r28079 r28097  
     12007-11-27  Alp Toker  <alp@atoker.com>
     2
     3        Reviewed by Maciej.
     4
     5        http://bugs.webkit.org/show_bug.cgi?id=15569
     6        [gtk] GTK JavaScriptCore needs to export symbols for JSC API and WTF
     7
     8        Introduce JS_EXPORT to mark symbols to be exported as public API.
     9
     10        Export all public symbols in the JavaScriptCore C API.
     11
     12        This matches conventions for exporting symbols set by the CF and CG
     13        frameworks.
     14
     15        * API/JSBase.h:
     16        * API/JSContextRef.h:
     17        * API/JSObjectRef.h:
     18        * API/JSStringRef.h:
     19        * API/JSStringRefBSTR.h:
     20        * API/JSStringRefCF.h:
     21        * API/JSValueRef.h:
     22
    1232007-11-27  Anders Carlsson  <andersca@apple.com>
    224
Note: See TracChangeset for help on using the changeset viewer.