]> git.saurik.com Git - cycript.git/blobdiff - Library.cpp
Fixed a minor packaging SNAFU that broke the iPhone build.
[cycript.git] / Library.cpp
index dbb86f243b860b25882a8ed3cc81ff5f41f92129..cccd69bb6e7f6ded3b714aa8bccdb69f8cd09130 100644 (file)
@@ -1449,8 +1449,6 @@ CYJSError::CYJSError(JSContextRef context, const char *format, ...) {
     CYThrow(context, exception);
 }
 
-void CYObjectiveC(JSContextRef context, JSObjectRef global);
-
 JSGlobalContextRef CYGetJSContext() {
     CYInitialize();
 
@@ -1569,10 +1567,8 @@ JSGlobalContextRef CYGetJSContext() {
 
         Result_ = JSStringCreateWithUTF8CString("_");
 
-// XXX: this is very wrong and sad
-#ifdef __APPLE__
-        CYObjectiveC(context, global);
-#endif
+        if (hooks_ != NULL && hooks_->SetupContext != NULL)
+            (*hooks_->SetupContext)(context);
     }
 
     return Context_;