Changeset 15444 in webkit for trunk/JavaScriptCore/API/testapi.c
- Timestamp:
- Jul 14, 2006, 9:16:30 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/testapi.c
r15443 r15444 183 183 } 184 184 185 static JSValueRef MyObject_callAsFunction(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t arg c, JSValueRef argv[], JSValueRef* exception)185 static JSValueRef MyObject_callAsFunction(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception) 186 186 { 187 187 UNUSED_PARAM(context); … … 189 189 UNUSED_PARAM(thisObject); 190 190 191 if (arg c > 0 && JSValueIsStrictEqual(context, argv[0], JSValueMakeNumber(0)))191 if (argumentCount > 0 && JSValueIsStrictEqual(context, arguments[0], JSValueMakeNumber(0))) 192 192 return JSValueMakeNumber(1); 193 193 … … 195 195 } 196 196 197 static JSObjectRef MyObject_callAsConstructor(JSContextRef context, JSObjectRef object, size_t arg c, JSValueRef argv[], JSValueRef* exception)198 { 199 UNUSED_PARAM(context); 200 UNUSED_PARAM(object); 201 202 if (arg c > 0 && JSValueIsStrictEqual(context, argv[0], JSValueMakeNumber(0)))197 static 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))) 203 203 return JSValueToObject(context, JSValueMakeNumber(1), NULL); 204 204 … … 266 266 } 267 267 268 static JSValueRef print_callAsFunction(JSContextRef context, JSObjectRef functionObject, JSObjectRef thisObject, size_t arg c, JSValueRef argv[], JSValueRef* exception)268 static JSValueRef print_callAsFunction(JSContextRef context, JSObjectRef functionObject, JSObjectRef thisObject, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception) 269 269 { 270 270 UNUSED_PARAM(functionObject); 271 271 UNUSED_PARAM(thisObject); 272 272 273 if (arg c> 0) {274 JSStringRef string = JSValueToStringCopy(context, arg v[0], NULL);273 if (argumentCount > 0) { 274 JSStringRef string = JSValueToStringCopy(context, arguments[0], NULL); 275 275 size_t sizeUTF8 = JSStringGetMaximumUTF8CStringSize(string); 276 276 char stringUTF8[sizeUTF8]; … … 283 283 } 284 284 285 static JSObjectRef myConstructor_callAsConstructor(JSContextRef context, JSObjectRef constructorObject, size_t arg c, JSValueRef argv[], JSValueRef* exception)285 static JSObjectRef myConstructor_callAsConstructor(JSContextRef context, JSObjectRef constructorObject, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception) 286 286 { 287 287 UNUSED_PARAM(constructorObject); 288 288 289 289 JSObjectRef result = JSObjectMake(context, NULL, 0); 290 if (arg c> 0) {290 if (argumentCount > 0) { 291 291 JSStringRef value = JSStringCreateWithUTF8CString("value"); 292 JSObjectSetProperty(context, result, value, arg v[0], kJSPropertyAttributeNone, NULL);292 JSObjectSetProperty(context, result, value, arguments[0], kJSPropertyAttributeNone, NULL); 293 293 JSStringRelease(value); 294 294 }
Note:
See TracChangeset
for help on using the changeset viewer.