lua-users home
lua-l archive

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


static TValue *index2value (lua_State *L, int idx) {
   .............
  else if (!ispseudo(idx)) {  /* negative index */
    api_check(L, idx != 0 && -idx <= L->top - (ci->func + 1), "invalid index");
    return s2v(L->top + idx);
  }
   .............
  }

Hi, I have some questions~~

When executing 'else if(!ispseudo(idx)', I found this comment /*
negative index */
If 'idx' equals 0 is also a negative index?