]> git.saurik.com Git - cycript.git/blobdiff - JavaScript.hpp
Fix build of cycript using clang++-3.7, from Fink.
[cycript.git] / JavaScript.hpp
index a94dbb9e22bb4192fea564f6618307182bdaf262..6ee7d9df06e0a95ea00604d58ff0c4fc2bc20958 100644 (file)
@@ -1,5 +1,5 @@
 /* Cycript - Optimizing JavaScript Compiler/Runtime
- * Copyright (C) 2009-2014  Jay Freeman (saurik)
+ * Copyright (C) 2009-2015  Jay Freeman (saurik)
 */
 
 /* GNU Affero General Public License, Version 3 {{{ */
@@ -131,6 +131,8 @@ struct CYHook {
 
     bool (*PoolFFI)(CYPool *, JSContextRef, sig::Type *, ffi_type *, void *, JSValueRef);
     JSValueRef (*FromFFI)(JSContextRef, sig::Type *, ffi_type *, void *, bool, JSObjectRef);
+
+    void *(*CastSymbol)(const char *);
 };
 
 struct CYRegisterHook {
@@ -205,6 +207,7 @@ class CYJSString {
     }
 };
 
+#ifdef __APPLE__
 typedef struct OpaqueJSWeakObjectMap *JSWeakObjectMapRef;
 typedef void (*JSWeakMapDestroyedCallback)(JSWeakObjectMapRef map, void *data);
 
@@ -213,5 +216,6 @@ extern "C" void JSWeakObjectMapSet(JSContextRef ctx, JSWeakObjectMapRef map, voi
 extern "C" JSObjectRef JSWeakObjectMapGet(JSContextRef ctx, JSWeakObjectMapRef map, void *key) __attribute__((__weak_import__));
 extern "C" bool JSWeakObjectMapClear(JSContextRef ctx, JSWeakObjectMapRef map, void *key, JSObjectRef object) __attribute__((__weak_import__));
 extern "C" void JSWeakObjectMapRemove(JSContextRef ctx, JSWeakObjectMapRef map, void* key) __attribute__((__weak_import__));
+#endif
 
 #endif/*CYCRIPT_JAVASCRIPT_HPP*/