X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/b64ab4dac5a76da209ff3cb12aa8bf83c6142607..020d5724ad5542a7097e8e11ce67d01f64c08bec:/cycript.hpp?ds=inline diff --git a/cycript.hpp b/cycript.hpp index 24ed1cd..f73a7e8 100644 --- a/cycript.hpp +++ b/cycript.hpp @@ -79,7 +79,7 @@ JSGlobalContextRef CYGetJSContext(); apr_pool_t *CYGetGlobalPool(); JSObjectRef CYGetGlobalObject(JSContextRef context); -void CYSetupContext(JSGlobalContextRef context); +extern "C" void CYSetupContext(JSGlobalContextRef context); const char *CYExecute(apr_pool_t *pool, const char *code); void CYSetArgs(int argc, const char *argv[]); @@ -92,8 +92,10 @@ const char *CYPoolCString(apr_pool_t *pool, JSContextRef context, JSStringRef va JSValueRef CYGetProperty(JSContextRef context, JSObjectRef object, size_t index); JSValueRef CYGetProperty(JSContextRef context, JSObjectRef object, JSStringRef name); + void CYSetProperty(JSContextRef context, JSObjectRef object, size_t index, JSValueRef value); void CYSetProperty(JSContextRef context, JSObjectRef object, JSStringRef name, JSValueRef value, JSPropertyAttributes attributes = kJSPropertyAttributeNone); +void CYSetProperty(JSContextRef context, JSObjectRef object, JSStringRef name, JSValueRef (*callback)(JSContextRef, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef *), JSPropertyAttributes attributes = kJSPropertyAttributeNone); JSObjectRef CYGetCachedObject(JSContextRef context, JSStringRef name);