From b92b16618ff3954e3c39be3d69e38914c5adb890 Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Wed, 1 Oct 2014 17:22:14 +0200 Subject: [PATCH] Bug 1067009 - Const-correct a few jsapi methods. r=billm --- js/src/jsapi.cpp | 4 ++-- js/src/jsapi.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index 8a1ee540301..a94fa6c7c7b 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -5824,7 +5824,7 @@ JS_ClearDateCaches(JSContext *cx) * Regular Expressions. */ JS_PUBLIC_API(JSObject *) -JS_NewRegExpObject(JSContext *cx, HandleObject obj, char *bytes, size_t length, unsigned flags) +JS_NewRegExpObject(JSContext *cx, HandleObject obj, const char *bytes, size_t length, unsigned flags) { AssertHeapIsIdle(cx); CHECK_REQUEST(cx); @@ -5842,7 +5842,7 @@ JS_NewRegExpObject(JSContext *cx, HandleObject obj, char *bytes, size_t length, } JS_PUBLIC_API(JSObject *) -JS_NewUCRegExpObject(JSContext *cx, HandleObject obj, char16_t *chars, size_t length, +JS_NewUCRegExpObject(JSContext *cx, HandleObject obj, const char16_t *chars, size_t length, unsigned flags) { AssertHeapIsIdle(cx); diff --git a/js/src/jsapi.h b/js/src/jsapi.h index defabeddce1..7a2d52646f8 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -4759,11 +4759,11 @@ JS_ClearDateCaches(JSContext *cx); #define JSREG_STICKY 0x08u /* only match starting at lastIndex */ extern JS_PUBLIC_API(JSObject *) -JS_NewRegExpObject(JSContext *cx, JS::HandleObject obj, char *bytes, size_t length, +JS_NewRegExpObject(JSContext *cx, JS::HandleObject obj, const char *bytes, size_t length, unsigned flags); extern JS_PUBLIC_API(JSObject *) -JS_NewUCRegExpObject(JSContext *cx, JS::HandleObject obj, char16_t *chars, size_t length, +JS_NewUCRegExpObject(JSContext *cx, JS::HandleObject obj, const char16_t *chars, size_t length, unsigned flags); extern JS_PUBLIC_API(bool)