aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/glsl_symbol_table.h
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glsl/glsl_symbol_table.h')
-rwxr-xr-x[-rw-r--r--]mesalib/src/glsl/glsl_symbol_table.h33
1 files changed, 2 insertions, 31 deletions
diff --git a/mesalib/src/glsl/glsl_symbol_table.h b/mesalib/src/glsl/glsl_symbol_table.h
index db8863a20..21b02e919 100644..100755
--- a/mesalib/src/glsl/glsl_symbol_table.h
+++ b/mesalib/src/glsl/glsl_symbol_table.h
@@ -43,42 +43,13 @@ struct glsl_type;
* type safe and some symbol table invariants.
*/
struct glsl_symbol_table {
-private:
- static void
- _glsl_symbol_table_destructor (glsl_symbol_table *table)
- {
- table->~glsl_symbol_table();
- }
-
-public:
- /* Callers of this ralloc-based new need not call delete. It's
- * easier to just ralloc_free 'ctx' (or any of its ancestors). */
- static void* operator new(size_t size, void *ctx)
- {
- void *table;
-
- table = ralloc_size(ctx, size);
- assert(table != NULL);
-
- ralloc_set_destructor(table, (void (*)(void*)) _glsl_symbol_table_destructor);
-
- return table;
- }
-
- /* If the user *does* call delete, that's OK, we will just
- * ralloc_free in that case. Here, C++ will have already called the
- * destructor so tell ralloc not to do that again. */
+ DECLARE_RALLOC_CXX_OPERATORS(glsl_symbol_table)
static void operator delete(void *table, void *ctx)
{
ralloc_set_destructor(table, NULL);
ralloc_free(table);
}
- static void operator delete(void *table)
- {
- ralloc_set_destructor(table, NULL);
- ralloc_free(table);
- }
-
+
glsl_symbol_table();
~glsl_symbol_table();