Mesa (7.10): glsl: Don't bother unsetting a destructor that was never set.

Kenneth Graunke kwg at kemper.freedesktop.org
Tue Feb 8 00:08:59 UTC 2011


Module: Mesa
Branch: 7.10
Commit: ea4df94d61891e6f45ba7922fee0011926b215c3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ea4df94d61891e6f45ba7922fee0011926b215c3

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Sat Jan 15 15:25:02 2011 -0800

glsl: Don't bother unsetting a destructor that was never set.

This was totally copied and pasted from glsl_symbol_table.

(cherry picked from commit 21031b4e887a4bd5563130d54a11972b69cb2645)

---

 src/glsl/glsl_symbol_table.cpp |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/glsl/glsl_symbol_table.cpp b/src/glsl/glsl_symbol_table.cpp
index 3dcd928..6fcfe07 100644
--- a/src/glsl/glsl_symbol_table.cpp
+++ b/src/glsl/glsl_symbol_table.cpp
@@ -35,13 +35,10 @@ public:
       return entry;
    }
 
-   /* If the user *does* call delete, that's OK, we will just
-    * talloc_free in that case. Here, C++ will have already called the
-    * destructor so tell talloc not to do that again. */
-   static void operator delete(void *table)
+   /* If the user *does* call delete, that's OK, we will just talloc_free. */
+   static void operator delete(void *entry)
    {
-      talloc_set_destructor(table, NULL);
-      talloc_free(table);
+      talloc_free(entry);
    }
 
    symbol_table_entry(ir_variable *v)                     : v(v), f(0), t(0) {}




More information about the mesa-commit mailing list