diff options
Diffstat (limited to 'Source/JavaScriptCore/API/JSBase.h')
-rw-r--r-- | Source/JavaScriptCore/API/JSBase.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/JavaScriptCore/API/JSBase.h b/Source/JavaScriptCore/API/JSBase.h index f46a41755..50e8f1e64 100644 --- a/Source/JavaScriptCore/API/JSBase.h +++ b/Source/JavaScriptCore/API/JSBase.h @@ -30,6 +30,10 @@ #include <stdbool.h> #endif +#ifdef __OBJC__ +#import <Foundation/Foundation.h> +#endif + /* JavaScript engine interface */ /*! @typedef JSContextGroupRef A group that associates JavaScript contexts with one another. Contexts in the same group may share and exchange JavaScript objects. */ @@ -135,4 +139,9 @@ JS_EXPORT void JSGarbageCollect(JSContextRef ctx); } #endif +/* Enable the Objective-C API for platforms with a modern runtime. */ +#if !defined(JSC_OBJC_API_ENABLED) +#define JSC_OBJC_API_ENABLED (defined(__clang__) && defined(__APPLE__) && defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 && !defined(__i386__)) +#endif + #endif /* JSBase_h */ |