forked from OctaForge/libcubescript
remove nodebug (useless/incompatible with pcall)
parent
820e7a9e9b
commit
6d2d8dda73
|
@ -343,7 +343,6 @@ struct OSTD_EXPORT CsState {
|
|||
CsIdentLink *p_callstack = nullptr;
|
||||
|
||||
int identflags = 0;
|
||||
int nodebug = 0;
|
||||
int protect = 0;
|
||||
|
||||
CsState();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue