summaryrefslogtreecommitdiffstats
path: root/src/util/string_to_uint_map.cpp
diff options
context:
space:
mode:
authorThomas Helland <thomashelland90@gmail.com>2016-08-16 22:10:36 +0200
committerTimothy Arceri <timothy.arceri@collabora.com>2016-09-12 10:48:35 +1000
commit08c5b10ae904231d887f9b6c37694c0e03939a28 (patch)
treedb97136a86537e3327927fa171e690822adeedf4 /src/util/string_to_uint_map.cpp
parente55eb2b7ea9a464eca9d2c6259f5b69299762856 (diff)
downloadexternal_mesa3d-08c5b10ae904231d887f9b6c37694c0e03939a28.zip
external_mesa3d-08c5b10ae904231d887f9b6c37694c0e03939a28.tar.gz
external_mesa3d-08c5b10ae904231d887f9b6c37694c0e03939a28.tar.bz2
mesa/glsl: Move string_to_uint_map into the util folder
This clears the last bits of the usecases of the hash table located in mesa/program, allowing us to remove it. V2: Rebase on top of changes to Makefile.sources Signed-off-by: Thomas Helland <thomashelland90@gmail.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Diffstat (limited to 'src/util/string_to_uint_map.cpp')
-rw-r--r--src/util/string_to_uint_map.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/util/string_to_uint_map.cpp b/src/util/string_to_uint_map.cpp
new file mode 100644
index 0000000..35fb76b
--- /dev/null
+++ b/src/util/string_to_uint_map.cpp
@@ -0,0 +1,42 @@
+/*
+ * Copyright © 2011 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file string_to_uint_map.cpp
+ * \brief Dumb wrapprs so that C code can create and destroy maps.
+ *
+ * \author Ian Romanick <ian.d.romanick@intel.com>
+ */
+#include "string_to_uint_map.h"
+
+extern "C" struct string_to_uint_map *
+string_to_uint_map_ctor()
+{
+ return new string_to_uint_map;
+}
+
+extern "C" void
+string_to_uint_map_dtor(struct string_to_uint_map *map)
+{
+ delete map;
+}