Reimplement the 'pairs' iterator and 'next' iterator

This commit is contained in:
2021-07-03 19:49:55 -04:00
parent 9eaeebb2da
commit be529afc55
4 changed files with 253 additions and 5 deletions

View File

@@ -72,6 +72,17 @@ int table_empty(lua_State *L);
//
int table_count(lua_State *L);
// table_sortedpairs
//
// Return a vector containing pairs from the table.
// This is not exposed directly to lua, but it is used
// in the new version of the 'pairs' iterator.
//
// The boolean 'unsortable' is set to indicate whether
// or not the table contains unsortable values.
//
int table_sortedpairs(lua_State *L, bool *unsortable);
// table_clear
//
// Remove all key/value pairs from the table. Does not