Ignore:
Timestamp:
Nov 27, 2007, 8:31:51 PM (17 years ago)
Author:
[email protected]
Message:

2007-11-27 Alp Toker <[email protected]>

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:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.