]> git.saurik.com Git - cycript.git/commitdiff
Added another with() for namespacing compatibility.
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 8 Nov 2009 00:00:54 +0000 (00:00 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 8 Nov 2009 00:00:54 +0000 (00:00 +0000)
Console.cpp

index fc745407a591bbc51d883736b51e2bfecbc6d06a..1ba72eaea2d9a4dee2c887cfd779269a0da8158f 100644 (file)
@@ -598,9 +598,11 @@ int Main(int argc, char const * const argv[], char const * const envp[]) {
             for (CYDriver::Errors::const_iterator i(driver.errors_.begin()); i != driver.errors_.end(); ++i)
                 std::cerr << i->location_.begin << ": " << i->message_ << std::endl;
         } else if (driver.program_ != NULL)
-            if (client != -1)
+            if (client != -1) {
+                std::string code(start, end-start);
+                code = "with(Cycript.all){" + code + "}";
                 Run(client, start, end - start, stdout);
-            else {
+            else {
                 std::ostringstream str;
                 CYOutput out(str);
                 Setup(out, driver);