Changeset 15444 in webkit for trunk/JavaScriptCore/API/testapi.c


Ignore:
Timestamp:
Jul 14, 2006, 9:16:30 PM (19 years ago)
Author:
ggaren
Message:

RS by Maciej.


Global replace in the API of argc/argv with argumentCount/arguments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/testapi.c

    r15443 r15444  
    183183}
    184184
    185 static JSValueRef MyObject_callAsFunction(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argc, JSValueRef argv[], JSValueRef* exception)
     185static JSValueRef MyObject_callAsFunction(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception)
    186186{
    187187    UNUSED_PARAM(context);
     
    189189    UNUSED_PARAM(thisObject);
    190190
    191     if (argc > 0 && JSValueIsStrictEqual(context, argv[0], JSValueMakeNumber(0)))
     191    if (argumentCount > 0 && JSValueIsStrictEqual(context, arguments[0], JSValueMakeNumber(0)))
    192192        return JSValueMakeNumber(1);
    193193   
     
    195195}
    196196
    197 static JSObjectRef MyObject_callAsConstructor(JSContextRef context, JSObjectRef object, size_t argc, JSValueRef argv[], JSValueRef* exception)
    198 {
    199     UNUSED_PARAM(context);
    200     UNUSED_PARAM(object);
    201 
    202     if (argc > 0 && JSValueIsStrictEqual(context, argv[0], JSValueMakeNumber(0)))
     197static JSObjectRef MyObject_callAsConstructor(JSContextRef context, JSObjectRef object, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception)
     198{
     199    UNUSED_PARAM(context);
     200    UNUSED_PARAM(object);
     201
     202    if (argumentCount > 0 && JSValueIsStrictEqual(context, arguments[0], JSValueMakeNumber(0)))
    203203        return JSValueToObject(context, JSValueMakeNumber(1), NULL);
    204204   
     
    266266}
    267267
    268 static JSValueRef print_callAsFunction(JSContextRef context, JSObjectRef functionObject, JSObjectRef thisObject, size_t argc, JSValueRef argv[], JSValueRef* exception)
     268static JSValueRef print_callAsFunction(JSContextRef context, JSObjectRef functionObject, JSObjectRef thisObject, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception)
    269269{
    270270    UNUSED_PARAM(functionObject);
    271271    UNUSED_PARAM(thisObject);
    272272   
    273     if (argc > 0) {
    274         JSStringRef string = JSValueToStringCopy(context, argv[0], NULL);
     273    if (argumentCount > 0) {
     274        JSStringRef string = JSValueToStringCopy(context, arguments[0], NULL);
    275275        size_t sizeUTF8 = JSStringGetMaximumUTF8CStringSize(string);
    276276        char stringUTF8[sizeUTF8];
     
    283283}
    284284
    285 static JSObjectRef myConstructor_callAsConstructor(JSContextRef context, JSObjectRef constructorObject, size_t argc, JSValueRef argv[], JSValueRef* exception)
     285static JSObjectRef myConstructor_callAsConstructor(JSContextRef context, JSObjectRef constructorObject, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception)
    286286{
    287287    UNUSED_PARAM(constructorObject);
    288288   
    289289    JSObjectRef result = JSObjectMake(context, NULL, 0);
    290     if (argc > 0) {
     290    if (argumentCount > 0) {
    291291        JSStringRef value = JSStringCreateWithUTF8CString("value");
    292         JSObjectSetProperty(context, result, value, argv[0], kJSPropertyAttributeNone, NULL);
     292        JSObjectSetProperty(context, result, value, arguments[0], kJSPropertyAttributeNone, NULL);
    293293        JSStringRelease(value);
    294294    }
Note: See TracChangeset for help on using the changeset viewer.