X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/be2fde8755ef463f48111bd2090e3bb29d16e8d7..73f04979fb72cb54812165867349917f0f207492:/Execute.cpp diff --git a/Execute.cpp b/Execute.cpp index 522aca4..1c7b833 100644 --- a/Execute.cpp +++ b/Execute.cpp @@ -1754,7 +1754,7 @@ JSGlobalContextRef CYGetJSContext(JSContextRef 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})); + int fd(_syscall_(open(path, O_RDONLY), 1, ENOENT)); if (fd == -1) return NULL; @@ -1930,10 +1930,12 @@ extern "C" void CYSetupContext(JSGlobalContextRef context) { //CYSetProperty(context, System, CYJSString("global"), global); CYSetProperty(context, System, CYJSString("print"), &System_print); +#ifdef __APPLE__ if (&JSWeakObjectMapCreate != NULL) { JSWeakObjectMapRef weak(JSWeakObjectMapCreate(context, NULL, NULL)); CYSetProperty(context, cy, weak_s, CYCastJSValue(context, reinterpret_cast(weak))); } +#endif if (CYBridgeEntry *entry = CYBridgeHash("1dlerror", 8)) entry->cache_ = new cy::Functor(entry->value_, reinterpret_cast(&dlerror));