case Parsing:
longjmp(ctrlc_, 1);
case Running:
-#ifndef __ANDROID__
+#ifdef CY_EXECUTE
CYCancel();
#endif
return;
}
};
+#ifdef CY_EXECUTE
void InjectLibrary(pid_t, std::ostream &stream, int, const char *const []);
class CYInjectRemote :
return CYUTF8String(strdup(json.c_str()), json.size());
}
};
+#endif
static std::ostream *out_;
} else if (data == "debug") {
debug = !debug;
*out_ << "debug == " << (debug ? "true" : "false") << std::endl;
+#ifdef CY_EXECUTE
} else if (data == "destroy") {
CYDestroyContext();
} else if (data == "gc") {
*out_ << "collecting... " << std::flush;
CYGarbageCollect(CYGetJSContext());
*out_ << "done." << std::endl;
+#endif
} else if (data == "exit") {
return;
} else if (data == "lower") {
const char *host(NULL);
const char *port(NULL);
+#ifdef CY_EXECUTE
const char *argv0(argv[0]);
+#endif
optind = 1;
CYSetArgs(argv0, script, argc, const_cast<const char **>(argv));
#endif
+#ifdef CY_EXECUTE
if (remote_ == NULL && pid != _not(pid_t))
remote_ = new CYInjectRemote(pid);
+#endif
if (remote_ == NULL && host != NULL && port != NULL)
remote_ = new CYSocketRemote(host, port);