glsl: add some more c wrappers for string_to_uint_map

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22846>
This commit is contained in:
Timothy Arceri
2023-04-06 11:58:16 +10:00
committed by Marge Bot
parent be91133f87
commit 5f26c647fb
2 changed files with 25 additions and 0 deletions

View File

@@ -40,3 +40,21 @@ string_to_uint_map_dtor(struct string_to_uint_map *map)
{
delete map;
}
extern "C" void
string_to_uint_map_put(struct string_to_uint_map *map,
unsigned value, const char *key)
{
map->put(value, key);
}
extern "C" bool
string_to_uint_map_get(struct string_to_uint_map *map,
unsigned *value, const char *key)
{
unsigned val;
bool r = map->get(val, key);
if (r)
*value = val;
return r;
}

View File

@@ -41,6 +41,13 @@ string_to_uint_map_ctor();
void
string_to_uint_map_dtor(struct string_to_uint_map *);
void
string_to_uint_map_put(struct string_to_uint_map *map,
unsigned value, const char *key);
bool
string_to_uint_map_get(struct string_to_uint_map *map,
unsigned *value, const char *key);
#ifdef __cplusplus
}