limit commandn to 6 arguments at most

master
Daniel Kolesa 2016-08-01 01:31:56 +01:00
parent 453776d362
commit 14b13365ab
2 changed files with 0 additions and 18 deletions

View File

@ -2684,12 +2684,6 @@ static inline void callcommand(CsState &cs, Ident *id, TaggedValue *args, int nu
case 4: id->cb_cf4(cs, ARG(0), ARG(1), ARG(2), ARG(3)); break; \
case 5: id->cb_cf5(cs, ARG(0), ARG(1), ARG(2), ARG(3), ARG(4)); break; \
case 6: id->cb_cf6(cs, ARG(0), ARG(1), ARG(2), ARG(3), ARG(4), ARG(5)); break; \
case 7: id->cb_cf7(cs, ARG(0), ARG(1), ARG(2), ARG(3), ARG(4), ARG(5), ARG(6)); break; \
case 8: id->cb_cf8(cs, ARG(0), ARG(1), ARG(2), ARG(3), ARG(4), ARG(5), ARG(6), ARG(7)); break; \
case 9: id->cb_cf9(cs, ARG(0), ARG(1), ARG(2), ARG(3), ARG(4), ARG(5), ARG(6), ARG(7), ARG(8)); break; \
case 10: id->cb_cf10(cs, ARG(0), ARG(1), ARG(2), ARG(3), ARG(4), ARG(5), ARG(6), ARG(7), ARG(8), ARG(9)); break; \
case 11: id->cb_cf11(cs, ARG(0), ARG(1), ARG(2), ARG(3), ARG(4), ARG(5), ARG(6), ARG(7), ARG(8), ARG(9), ARG(10)); break; \
case 12: id->cb_cf12(cs, ARG(0), ARG(1), ARG(2), ARG(3), ARG(4), ARG(5), ARG(6), ARG(7), ARG(8), ARG(9), ARG(10), ARG(11)); break; \
}
if (id->flags & IDF_NOEXPAND) {
id->cb_cftv(cs, TvalRange(args, i));

View File

@ -168,12 +168,6 @@ using CommandFunc3 = void (*)(CsState &, void *, void *, void *);
using CommandFunc4 = void (*)(CsState &, void *, void *, void *, void *);
using CommandFunc5 = void (*)(CsState &, void *, void *, void *, void *, void *);
using CommandFunc6 = void (*)(CsState &, void *, void *, void *, void *, void *, void *);
using CommandFunc7 = void (*)(CsState &, void *, void *, void *, void *, void *, void *, void *);
using CommandFunc8 = void (*)(CsState &, void *, void *, void *, void *, void *, void *, void *, void *);
using CommandFunc9 = void (*)(CsState &, void *, void *, void *, void *, void *, void *, void *, void *, void *);
using CommandFunc10 = void (*)(CsState &, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *);
using CommandFunc11 = void (*)(CsState &, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *);
using CommandFunc12 = void (*)(CsState &, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *);
using CommandFuncTv = void (*)(CsState &, TvalRange);
struct OSTD_EXPORT Ident {
@ -217,12 +211,6 @@ struct OSTD_EXPORT Ident {
CommandFunc4 cb_cf4;
CommandFunc5 cb_cf5;
CommandFunc6 cb_cf6;
CommandFunc7 cb_cf7;
CommandFunc8 cb_cf8;
CommandFunc9 cb_cf9;
CommandFunc10 cb_cf10;
CommandFunc11 cb_cf11;
CommandFunc12 cb_cf12;
CommandFuncTv cb_cftv;
};