lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

I noticed a strange code in lvm.c
> static void callTMres ([skipped]) {
>   [skipped]
>   setobj2s(L, L->top, f);  /* push function */
>   setobj2s(L, L->top+1, p1);  /* 1st argument */
>   setobj2s(L, L->top+2, p2);  /* 2nd argument */
>   luaD_checkstack(L, 3);

Why to check stack _after_ not _before_ ``pushing''?

TIA,
 Antero Vipunen.