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:

committed by
Marge Bot

parent
be91133f87
commit
5f26c647fb
@@ -40,3 +40,21 @@ string_to_uint_map_dtor(struct string_to_uint_map *map)
|
|||||||
{
|
{
|
||||||
delete 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;
|
||||||
|
}
|
||||||
|
@@ -41,6 +41,13 @@ string_to_uint_map_ctor();
|
|||||||
void
|
void
|
||||||
string_to_uint_map_dtor(struct string_to_uint_map *);
|
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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user