X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/efd689d86ad25be72d38cf012d90ffe0203850d1..a5662a5364816f852acb056d5c2b2fc94e0c0a5c:/Execute.cpp diff --git a/Execute.cpp b/Execute.cpp index c871ef5..9f45354 100644 --- a/Execute.cpp +++ b/Execute.cpp @@ -368,7 +368,7 @@ static JSValueRef $cyq(JSContextRef context, JSObjectRef object, JSObjectRef _th static void (*JSSynchronousGarbageCollectForDebugging$)(JSContextRef); -void CYGarbageCollect(JSContextRef context) { +_visible void CYGarbageCollect(JSContextRef context) { (JSSynchronousGarbageCollectForDebugging$ ?: &JSGarbageCollect)(context); } @@ -1538,7 +1538,7 @@ static JSStaticFunction Type_staticFunctions[14] = { static JSObjectRef (*JSObjectMakeArray$)(JSContextRef, size_t, const JSValueRef[], JSValueRef *); -void CYSetArgs(int argc, const char *argv[]) { +_visible void CYSetArgs(int argc, const char *argv[]) { JSContextRef context(CYGetJSContext()); JSValueRef args[argc]; for (int i(0); i != argc; ++i) @@ -1596,7 +1596,7 @@ static bool CYShouldTerminate(JSContextRef context, void *arg) { return cancel_; } -const char *CYExecute(JSContextRef context, CYPool &pool, CYUTF8String code) { +_visible const char *CYExecute(JSContextRef context, CYPool &pool, CYUTF8String code) { JSValueRef exception(NULL); if (false) error: return CYPoolCString(pool, context, CYJSString(context, exception)); @@ -1624,7 +1624,7 @@ const char *CYExecute(JSContextRef context, CYPool &pool, CYUTF8String code) { return json; } -void CYCancel() { +_visible void CYCancel() { cancel_ = true; } @@ -1759,8 +1759,6 @@ JSGlobalContextRef CYGetJSContext(JSContextRef context) { return reinterpret_cast(JSObjectGetPrivate(CYCastJSObject(context, CYGetProperty(context, CYGetGlobalObject(context), cy_s))))->context_; } -extern "C" bool CydgetMemoryParse(const uint16_t **data, size_t *size); - void *CYMapFile(const char *path, size_t *psize) { int fd(_syscall_(open(path, O_RDONLY), 1, ENOENT)); if (fd == -1) @@ -1960,7 +1958,7 @@ extern "C" void CYSetupContext(JSGlobalContextRef context) { static JSGlobalContextRef context_; -JSGlobalContextRef CYGetJSContext() { +_visible JSGlobalContextRef CYGetJSContext() { CYInitializeDynamic(); if (context_ == NULL) { @@ -1971,7 +1969,7 @@ JSGlobalContextRef CYGetJSContext() { return context_; } -void CYDestroyContext() { +_visible void CYDestroyContext() { if (context_ == NULL) return; JSGlobalContextRelease(context_);