summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul J. Davis <paul.joseph.davis@gmail.com>2020-04-14 13:21:01 -0500
committerPaul J. Davis <paul.joseph.davis@gmail.com>2020-04-15 15:35:12 -0500
commita7ae5eab4f9ae0cee232c93ff63ee63ecc8942d2 (patch)
tree50f74a62261f2febc9c36a271181fe9d93602fed
parent7f24addb6548981e8bc0cb44f7b70b0b1de131aa (diff)
downloadcouchdb-a7ae5eab4f9ae0cee232c93ff63ee63ecc8942d2.tar.gz
Remove unused string conversion function
-rw-r--r--src/couch/priv/couch_js/60/util.cpp13
-rw-r--r--src/couch/priv/couch_js/60/util.h1
2 files changed, 0 insertions, 14 deletions
diff --git a/src/couch/priv/couch_js/60/util.cpp b/src/couch/priv/couch_js/60/util.cpp
index 92c6cbf4a..ad68f26f2 100644
--- a/src/couch/priv/couch_js/60/util.cpp
+++ b/src/couch/priv/couch_js/60/util.cpp
@@ -37,19 +37,6 @@ js_to_string(JSContext* cx, JS::HandleValue val)
return chars.get();
}
-std::string
-js_to_string(JSContext* cx, JSString *str)
-{
- JS::UniqueChars chars(JS_EncodeString(cx, str));
- if(!chars) {
- JS_ClearPendingException(cx);
- fprintf(stderr, "Error converting to string.\n");
- exit(3);
- }
-
- return chars.get();
-}
-
JSString*
string_to_js(JSContext* cx, const std::string& s)
{
diff --git a/src/couch/priv/couch_js/60/util.h b/src/couch/priv/couch_js/60/util.h
index 407e3e602..0c9f0f8f1 100644
--- a/src/couch/priv/couch_js/60/util.h
+++ b/src/couch/priv/couch_js/60/util.h
@@ -26,7 +26,6 @@ typedef struct {
} couch_args;
std::string js_to_string(JSContext* cx, JS::HandleValue val);
-std::string js_to_string(JSContext* cx, JSString *str);
JSString* string_to_js(JSContext* cx, const std::string& s);
couch_args* couch_parse_args(int argc, const char* argv[]);