Reimplement queues as circular buffers

This commit is contained in:
2021-07-09 18:07:06 -04:00
parent 311575eb30
commit 16c0fd45de
5 changed files with 106 additions and 63 deletions

View File

@@ -72,20 +72,6 @@ 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 'sort' is used to control whether the pairs
// are to be sorted or not.
//
// The boolean 'unsortable' returns a flag indicating
// whether or not unsortable items were omitted.
//
int table_getpairs(lua_State *L, bool sort, bool *unsortable);
// table_clear
//
// Remove all key/value pairs from the table. Does not
@@ -95,7 +81,9 @@ int table_clear(lua_State *L);
// queue_create
//
// Create and return an empty queue.
// Create and return an empty queue. Queues are implemented
// as tables which are used as dynamically-expandable circular
// buffers.
//
int queue_create(lua_State *L);