forked from ground/ground
made the collections lib use the "any" type
This commit is contained in:
@@ -123,8 +123,8 @@ GroundValue createHashmapStruct() {
|
||||
groundAddFieldToStruct(&hashmapStruct, "private_ptr", groundCreateValue(INT, 0));
|
||||
|
||||
groundAddFunctionToStruct(&hashmapStruct, "set", hashmapStructSet, INT, 2, STRING, "key", ANY, "value"); // set a key in the hashmap
|
||||
groundAddFunctionToStruct(&hashmapStruct, "get", hashmapStructGet, INT, 1, STRING, "key"); // get a key in the hashmap, throws KeyNotFound if the key does not exist
|
||||
groundAddFunctionToStruct(&hashmapStruct, "getOr", hashmapStructGetOr, INT, 2, STRING, "key", ANY, "default"); // get a key in the hashmap, or fallback to a default value
|
||||
groundAddFunctionToStruct(&hashmapStruct, "get", hashmapStructGet, ANY, 1, STRING, "key"); // get a key in the hashmap, throws KeyNotFound if the key does not exist
|
||||
groundAddFunctionToStruct(&hashmapStruct, "getOr", hashmapStructGetOr, ANY, 2, STRING, "key", ANY, "default"); // get a key in the hashmap, or fallback to a default value
|
||||
groundAddFunctionToStruct(&hashmapStruct, "remove", hashmapStructRemove, INT, 1, STRING, "key"); // remove a key from the hashmap, throws KeyNotFound if the key does not exist
|
||||
groundAddFunctionToStruct(&hashmapStruct, "removeIfPresent", hashmapStructRemoveIfPresent, BOOL, 1, STRING, "key"); // remove a key from the hashmap, returns true if the key was removed or false if it didn't exist
|
||||
|
||||
|
||||
Reference in New Issue
Block a user