Changeset 28097 in webkit for trunk/JavaScriptCore/API/JSBase.h


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