mirror of
https://git.telodendria.io/Telodendria/Cytoplasm.git
synced 2025-04-25 02:16:03 +00:00
C99 Compliance (#29)
This pull request brings Cytoplasm up from C89 to C99, which makes it much more portable across platforms. In particular, this pull request solves a number of issues with 32-bit platforms. Closes #28. Closes #12. Closes #20. Reviewed-on: https://git.telodendria.io/Telodendria/Cytoplasm/pulls/29
This commit is contained in:
parent
d0969d0dd7
commit
662696ce12
40 changed files with 384 additions and 1667 deletions
|
@ -247,12 +247,12 @@ HashMapGet(HashMap * map, const char *key)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
int
|
||||
bool
|
||||
HashMapIterateReentrant(HashMap * map, char **key, void **value, size_t * i)
|
||||
{
|
||||
if (!map)
|
||||
{
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (*i >= map->capacity)
|
||||
|
@ -260,7 +260,7 @@ HashMapIterateReentrant(HashMap * map, char **key, void **value, size_t * i)
|
|||
*i = 0;
|
||||
*key = NULL;
|
||||
*value = NULL;
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
while (*i < map->capacity)
|
||||
|
@ -273,20 +273,20 @@ HashMapIterateReentrant(HashMap * map, char **key, void **value, size_t * i)
|
|||
{
|
||||
*key = bucket->key;
|
||||
*value = bucket->value;
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
*i = 0;
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
int
|
||||
bool
|
||||
HashMapIterate(HashMap * map, char **key, void **value)
|
||||
{
|
||||
if (!map)
|
||||
{
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue