* API/JSNode.c:
(JSNodePrototype_appendChild): Added const.
(JSNodePrototype_removeChild): Ditto.
(JSNodePrototype_replaceChild): Ditto.
(JSNode_construct): Ditto.
* API/JSNodeList.c:
(JSNodeListPrototype_item): Ditto.
* API/JSObjectRef.cpp:
(JSObjectMakeFunctionWithBody): Ditto.
(JSObjectCallAsFunction): Ditto.
(JSObjectCallAsConstructor): Ditto.
* API/minidom.c:
(print): Ditto.
* API/testapi.c:
(MyObject_callAsFunction): Ditto.
(MyObject_callAsConstructor): Ditto.
(print_callAsFunction): Ditto.
(myConstructor_callAsConstructor): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15465
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
static JSClassRef JSNode_class(JSContextRef context);
-static JSValueRef JSNodePrototype_appendChild(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef JSNodePrototype_appendChild(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
UNUSED_PARAM(context);
UNUSED_PARAM(function);
return JSValueMakeUndefined();
}
-static JSValueRef JSNodePrototype_removeChild(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef JSNodePrototype_removeChild(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
UNUSED_PARAM(context);
UNUSED_PARAM(function);
return JSValueMakeUndefined();
}
-static JSValueRef JSNodePrototype_replaceChild(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef JSNodePrototype_replaceChild(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
UNUSED_PARAM(context);
UNUSED_PARAM(function);
return jsNode;
}
-JSObjectRef JSNode_construct(JSContextRef context, JSObjectRef object, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception)
+JSObjectRef JSNode_construct(JSContextRef context, JSObjectRef object, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
UNUSED_PARAM(object);
UNUSED_PARAM(argumentCount);
#include "JSNodeList.h"
#include "UnusedParam.h"
-static JSValueRef JSNodeListPrototype_item(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef JSNodeListPrototype_item(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
if (argumentCount > 0) {
NodeList* nodeList = JSObjectGetPrivate(thisObject);
return toRef(new JSCallbackConstructor(exec, callAsConstructor));
}
-JSObjectRef JSObjectMakeFunctionWithBody(JSContextRef context, JSStringRef name, unsigned parameterCount, JSStringRef parameterNames[], JSStringRef body, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception)
+JSObjectRef JSObjectMakeFunctionWithBody(JSContextRef context, JSStringRef name, unsigned parameterCount, const JSStringRef parameterNames[], JSStringRef body, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception)
{
JSLock lock;
return jsObject->implementsCall();
}
-JSValueRef JSObjectCallAsFunction(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception)
+JSValueRef JSObjectCallAsFunction(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
JSLock lock;
ExecState* exec = toJS(context);
return jsObject->implementsConstruct();
}
-JSObjectRef JSObjectCallAsConstructor(JSContextRef context, JSObjectRef object, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception)
+JSObjectRef JSObjectCallAsConstructor(JSContextRef context, JSObjectRef object, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
JSLock lock;
ExecState* exec = toJS(context);
#include <wtf/UnusedParam.h>
static char* createStringWithContentsOfFile(const char* fileName);
-static JSValueRef print(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception);
+static JSValueRef print(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
int main(int argc, char* argv[])
{
return 0;
}
-static JSValueRef print(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef print(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
if (argumentCount > 0) {
JSStringRef string = JSValueToStringCopy(context, arguments[0], NULL);
JSStringRelease(propertyName);
}
-static JSValueRef MyObject_callAsFunction(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef MyObject_callAsFunction(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
UNUSED_PARAM(context);
UNUSED_PARAM(object);
return JSValueMakeUndefined();
}
-static JSObjectRef MyObject_callAsConstructor(JSContextRef context, JSObjectRef object, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception)
+static JSObjectRef MyObject_callAsConstructor(JSContextRef context, JSObjectRef object, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
UNUSED_PARAM(context);
UNUSED_PARAM(object);
return jsClass;
}
-static JSValueRef print_callAsFunction(JSContextRef context, JSObjectRef functionObject, JSObjectRef thisObject, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef print_callAsFunction(JSContextRef context, JSObjectRef functionObject, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
UNUSED_PARAM(functionObject);
UNUSED_PARAM(thisObject);
return JSValueMakeUndefined();
}
-static JSObjectRef myConstructor_callAsConstructor(JSContextRef context, JSObjectRef constructorObject, size_t argumentCount, JSValueRef arguments[], JSValueRef* exception)
+static JSObjectRef myConstructor_callAsConstructor(JSContextRef context, JSObjectRef constructorObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
UNUSED_PARAM(constructorObject);
+2006-07-15 Darin Adler <darin@apple.com>
+
+ - oops, missed a few more arrays that had to be const
+
+ * API/JSNode.c:
+ (JSNodePrototype_appendChild): Added const.
+ (JSNodePrototype_removeChild): Ditto.
+ (JSNodePrototype_replaceChild): Ditto.
+ (JSNode_construct): Ditto.
+ * API/JSNodeList.c:
+ (JSNodeListPrototype_item): Ditto.
+ * API/JSObjectRef.cpp:
+ (JSObjectMakeFunctionWithBody): Ditto.
+ (JSObjectCallAsFunction): Ditto.
+ (JSObjectCallAsConstructor): Ditto.
+ * API/minidom.c:
+ (print): Ditto.
+ * API/testapi.c:
+ (MyObject_callAsFunction): Ditto.
+ (MyObject_callAsConstructor): Ditto.
+ (print_callAsFunction): Ditto.
+ (myConstructor_callAsConstructor): Ditto.
+
2006-07-15 Darin Adler <darin@apple.com>
Reviewed by Maciej.