remove nodebug (useless/incompatible with pcall)

master
Daniel Kolesa 2016-09-10 20:09:59 +02:00
parent 820e7a9e9b
commit 6d2d8dda73
3 changed files with 0 additions and 13 deletions

View File

@ -343,7 +343,6 @@ struct OSTD_EXPORT CsState {
CsIdentLink *p_callstack = nullptr;
int identflags = 0;
int nodebug = 0;
int protect = 0;
CsState();

View File

@ -110,9 +110,6 @@ CsStackState cs_save_stack(CsState &cs);
template<typename ...A>
void cs_debug_code(CsState &cs, ostd::ConstCharRange fmt, A &&...args) {
if (cs.nodebug) {
return;
}
cs.get_err().writefln(fmt, ostd::forward<A>(args)...);
auto st = cs_save_stack(cs);
cscript::util::print_stack(cs.get_err().iter(), st);

View File

@ -1298,15 +1298,6 @@ void cs_init_lib_base(CsState &cs) {
);
});
cs.new_command("nodebug", "e", [&cs](CsValueRange args, CsValue &res) {
++cs.nodebug;
cs_do_and_cleanup([&]() {
cs.run(args[0].get_code(), res);
}, [&cs]() {
--cs.nodebug;
});
});
cs.new_command("push", "rTe", [&cs](CsValueRange args, CsValue &res) {
CsStackedValue idv{args[0].get_ident()};
if (!idv.has_alias() || (idv.get_alias()->get_index() < MaxArguments)) {