diff --git a/src/compiler/glsl/string_to_uint_map.cpp b/src/compiler/glsl/string_to_uint_map.cpp index 35fb76bf78d..84443286010 100644 --- a/src/compiler/glsl/string_to_uint_map.cpp +++ b/src/compiler/glsl/string_to_uint_map.cpp @@ -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; +} diff --git a/src/compiler/glsl/string_to_uint_map.h b/src/compiler/glsl/string_to_uint_map.h index 6f9251f90c3..c38d59ad41b 100644 --- a/src/compiler/glsl/string_to_uint_map.h +++ b/src/compiler/glsl/string_to_uint_map.h @@ -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 }