diff options
author | Robert Newson <rnewson@apache.org> | 2011-10-06 10:39:21 +0100 |
---|---|---|
committer | Robert Newson <rnewson@apache.org> | 2011-10-06 10:39:21 +0100 |
commit | 5b558c81ed9709fb286a6821e9ae6d6478012c2c (patch) | |
tree | df5689ac2ecfda77d4129a4c814dc21f68b93653 /src/couchdb/priv/couch_js/utf8.c | |
parent | e6c0fc955ea2be0fd3c4e894fd0c7cc87202c5a5 (diff) |
Remove SpiderMonkey 1.8.5 compatibility
This commit reverts 1.8.5 compatibility including the corresponding couchjs
paren hack as this leads to significant breakage in existing functions.
Diffstat (limited to 'src/couchdb/priv/couch_js/utf8.c')
-rw-r--r-- | src/couchdb/priv/couch_js/utf8.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/couchdb/priv/couch_js/utf8.c b/src/couchdb/priv/couch_js/utf8.c index d6064267..699a6fee 100644 --- a/src/couchdb/priv/couch_js/utf8.c +++ b/src/couchdb/priv/couch_js/utf8.c @@ -11,7 +11,6 @@ // the License. #include <jsapi.h> -#include "config.h" static int enc_char(uint8 *utf8Buffer, uint32 ucs4Char) @@ -122,7 +121,7 @@ char* enc_string(JSContext* cx, jsval arg, size_t* buflen) { JSString* str = NULL; - const jschar* src = NULL; + jschar* src = NULL; char* bytes = NULL; size_t srclen = 0; size_t byteslen = 0; @@ -130,12 +129,8 @@ enc_string(JSContext* cx, jsval arg, size_t* buflen) str = JS_ValueToString(cx, arg); if(!str) goto error; -#ifdef HAVE_JS_GET_STRING_CHARS_AND_LENGTH - src = JS_GetStringCharsAndLength(cx, str, &srclen); -#else src = JS_GetStringChars(str); srclen = JS_GetStringLength(str); -#endif if(!enc_charbuf(src, srclen, NULL, &byteslen)) goto error; @@ -288,4 +283,4 @@ error: success: return str; -} +}
\ No newline at end of file |