X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/4b645e23d2abde4de1ced347750b070f89b685c3..78b24692d45f090f846e4c327ca7fa2ee6d302eb:/JavaScript.hpp?ds=sidebyside diff --git a/JavaScript.hpp b/JavaScript.hpp index c75fd7c..47a9618 100644 --- a/JavaScript.hpp +++ b/JavaScript.hpp @@ -1,5 +1,5 @@ -/* Cycript - Optimizing JavaScript Compiler/Runtime - * Copyright (C) 2009-2015 Jay Freeman (saurik) +/* Cycript - The Truly Universal Scripting Language + * Copyright (C) 2009-2016 Jay Freeman (saurik) */ /* GNU Affero General Public License, Version 3 {{{ */ @@ -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; @@ -63,7 +64,10 @@ JSObjectRef CYGetGlobalObject(JSContextRef context); extern "C" void CYSetupContext(JSGlobalContextRef context); const char *CYExecute(JSContextRef context, CYPool &pool, CYUTF8String code); + +#ifndef __ANDROID__ void CYCancel(); +#endif void CYSetArgs(int argc, const char *argv[]); @@ -180,6 +184,11 @@ class CYJSString { } public: + CYJSString() : + string_(NULL) + { + } + CYJSString(const CYJSString &rhs) : string_(CYCopyJSString(rhs.string_)) { @@ -203,6 +212,11 @@ class CYJSString { return *this; } + CYJSString &operator =(CYJSString &&rhs) { + std::swap(string_, rhs.string_); + return *this; + } + ~CYJSString() { Clear_(); }