]> git.saurik.com Git - cycript.git/blobdiff - Handler.mm
Ported Objective-C bridge to match up with the latest compiler changes.
[cycript.git] / Handler.mm
index 79528c447723723f1eaeb383031d35c0c8a50974..9c1a8dfb78c848ec4f165129fcd126671cd9900d 100644 (file)
 /* }}} */
 
 #include "cycript.hpp"
+#include "JavaScript.hpp"
 
 #include "Pooling.hpp"
 #include "Parser.hpp"
+#include "Context.hpp"
 
 #include "Cycript.tab.hh"
 
@@ -129,10 +131,11 @@ struct CYClient :
             } else {
                 NSAutoreleasePool *ar = [[NSAutoreleasePool alloc] init];
 
-                CYContext context(driver.pool_);
+                CYOptions options;
+                CYContext context(driver.pool_, options);
                 driver.program_->Replace(context);
                 std::ostringstream str;
-                CYOutput out(str);
+                CYOutput out(str, options);
                 out << *driver.program_;
                 std::string code(str.str());
                 CYExecute_ execute = {pool, code.c_str()};
@@ -173,7 +176,7 @@ extern "C" void CYHandleClient(apr_pool_t *pool, int socket) {
 }
 
 extern "C" void CYHandleServer(pid_t pid) {
-    CYInitialize();
+    CYInitializeDynamic();
 
     int socket(_syscall(::socket(PF_UNIX, SOCK_STREAM, 0))); try {
         struct sockaddr_un address;