mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-18 13:49:59 +01:00
Finish making code for working with lists use unsigned ints.
This commit is contained in:
@ -393,8 +393,6 @@ typedef struct
|
||||
{
|
||||
Obj obj;
|
||||
|
||||
// TODO: Make these uint32_t to match ObjMap, or vice versa.
|
||||
|
||||
// The number of elements allocated.
|
||||
uint32_t capacity;
|
||||
|
||||
@ -639,16 +637,16 @@ Value wrenNewInstance(WrenVM* vm, ObjClass* classObj);
|
||||
|
||||
// Creates a new list with [numElements] elements (which are left
|
||||
// uninitialized.)
|
||||
ObjList* wrenNewList(WrenVM* vm, int numElements);
|
||||
ObjList* wrenNewList(WrenVM* vm, uint32_t numElements);
|
||||
|
||||
// Adds [value] to [list], reallocating and growing its storage if needed.
|
||||
void wrenListAdd(WrenVM* vm, ObjList* list, Value value);
|
||||
|
||||
// Inserts [value] in [list] at [index], shifting down the other elements.
|
||||
void wrenListInsert(WrenVM* vm, ObjList* list, Value value, int index);
|
||||
void wrenListInsert(WrenVM* vm, ObjList* list, Value value, uint32_t index);
|
||||
|
||||
// Removes and returns the item at [index] from [list].
|
||||
Value wrenListRemoveAt(WrenVM* vm, ObjList* list, int index);
|
||||
Value wrenListRemoveAt(WrenVM* vm, ObjList* list, uint32_t index);
|
||||
|
||||
// Creates a new empty map.
|
||||
ObjMap* wrenNewMap(WrenVM* vm);
|
||||
|
||||
Reference in New Issue
Block a user