Lines Matching refs:pos
92 int pos; /* where to insert new element */ in tinsert() local
95 pos = e; /* insert new element at the end */ in tinsert()
100 pos = luaL_checkint(L, 2); /* 2nd argument is the position */ in tinsert()
101 if (pos > e) e = pos; /* `grow' array if necessary */ in tinsert()
102 for (i = e; i > pos; i--) { /* move up elements */ in tinsert()
113 lua_rawseti(L, 1, pos); /* t[pos] = v */ in tinsert()
120 int pos = luaL_optint(L, 2, e); in tremove() local
121 if (!(1 <= pos && pos <= e)) /* position is outside bounds? */ in tremove()
124 lua_rawgeti(L, 1, pos); /* result = t[pos] */ in tremove()
125 for ( ;pos<e; pos++) { in tremove()
126 lua_rawgeti(L, 1, pos+1); in tremove()
127 lua_rawseti(L, 1, pos); /* t[pos] = t[pos+1] */ in tremove()