Ignore:
Timestamp:
Jul 15, 2006, 7:18:37 PM (19 years ago)
Author:
darin
Message:

Reviewed by Maciej.

  • API/JSNode.h: Made an array parameter const.
  • API/JSObjectRef.h: Made array parameters const. Fixed a comment.
File:
1 edited

Legend:

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

    r15463 r15464  
    182182@discussion If you named your function CallAsFunction, you would declare it like this:
    183183
    184 JSValueRef CallAsFunction(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception);
     184JSValueRef CallAsFunction(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
    185185
    186186If your callback were invoked by the JavaScript expression 'myObject.myMemberFunction()', function would be set to myMemberFunction, and thisObject would be set to myObject.
     
    189189*/
    190190typedef JSValueRef
    191 (*JSObjectCallAsFunctionCallback) (JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception);
     191(*JSObjectCallAsFunctionCallback) (JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
    192192
    193193/*!
     
    202202@discussion If you named your function CallAsConstructor, you would declare it like this:
    203203
    204 JSObjectRef CallAsConstructor(JSContextRef context, JSObjectRef constructor, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception);
     204JSObjectRef CallAsConstructor(JSContextRef context, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
    205205
    206206If your callback were invoked by the JavaScript expression 'new myConstructorFunction()', constructor would be set to myConstructorFunction.
     
    209209*/
    210210typedef JSObjectRef
    211 (*JSObjectCallAsConstructorCallback) (JSContextRef context, JSObjectRef constructor, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception);
     211(*JSObjectCallAsConstructorCallback) (JSContextRef context, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
    212212
    213213/*!
     
    398398@abstract Creates a function with a given script as its body.
    399399@param context The execution context to use.
    400 @param A JSString containting the function's name. Pass NULL to create an anonymous function.
     400@param name A JSString containing the function's name. Pass NULL to create an anonymous function.
    401401@param parameterCount An integer count of the number of parameter names in parameterNames.
    402402@param parameterNames A JSString array containing the names of the function's parameters. Pass NULL if parameterCount is 0.
     
    408408@discussion Use this method when you want to execute a script repeatedly, to avoid the cost of re-parsing the script before each execution.
    409409*/
    410 JSObjectRef JSObjectMakeFunctionWithBody(JSContextRef context, JSStringRef name, unsigned parameterCount, JSStringRef parameterNames[], JSStringRef body, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception);
     410JSObjectRef JSObjectMakeFunctionWithBody(JSContextRef context, JSStringRef name, unsigned parameterCount, const JSStringRef parameterNames[], JSStringRef body, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception);
    411411
    412412/*!
     
    528528@result The JSValue that results from calling object as a function, or NULL if an exception is thrown or object is not a function.
    529529*/
    530 JSValueRef JSObjectCallAsFunction(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception);
     530JSValueRef JSObjectCallAsFunction(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
    531531/*!
    532532@function
     
    546546@result The JSObject that results from calling object as a constructor, or NULL if an exception is thrown or object is not a constructor.
    547547*/
    548 JSObjectRef JSObjectCallAsConstructor(JSContextRef context, JSObjectRef object, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception);
     548JSObjectRef JSObjectCallAsConstructor(JSContextRef context, JSObjectRef object, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
    549549
    550550/*!
Note: See TracChangeset for help on using the changeset viewer.