X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/e2ce853b4a48f8278dc46e4143aa845b18948651..2f33dd04e61fcd883fc6ddcb8f2add8fd9a45eba:/JavaScript.hpp diff --git a/JavaScript.hpp b/JavaScript.hpp index 04c1e2f..8b58024 100644 --- a/JavaScript.hpp +++ b/JavaScript.hpp @@ -41,6 +41,7 @@ #include "String.hpp" extern JSStringRef Array_s; +extern JSStringRef constructor_s; extern JSStringRef cy_s; extern JSStringRef cyi_s; extern JSStringRef cyt_s; @@ -68,7 +69,7 @@ const char *CYExecute(JSContextRef context, CYPool &pool, CYUTF8String code); void CYCancel(); #endif -void CYSetArgs(int argc, const char *argv[]); +void CYSetArgs(const char *argv0, const char *script, int argc, const char *argv[]); bool CYCastBool(JSContextRef context, JSValueRef value); double CYCastDouble(JSContextRef context, JSValueRef value); @@ -183,6 +184,11 @@ class CYJSString { } public: + CYJSString() : + string_(NULL) + { + } + CYJSString(const CYJSString &rhs) : string_(CYCopyJSString(rhs.string_)) { @@ -206,6 +212,11 @@ class CYJSString { return *this; } + CYJSString &operator =(CYJSString &&rhs) { + std::swap(string_, rhs.string_); + return *this; + } + ~CYJSString() { Clear_(); }