diff src/unwind-prot.h @ 5760:8d7162924bd3

[project @ 2006-04-14 04:01:37 by jwe]
author jwe
date Fri, 14 Apr 2006 04:01:40 +0000
parents 4c8a2e4e0717
children 68f8017ef077
line wrap: on
line diff
--- a/src/unwind-prot.h
+++ b/src/unwind-prot.h
@@ -122,7 +122,12 @@
   unwind_protect::save_str (&(s), (s))
 
 #define unwind_protect_ptr(p) \
-  unwind_protect::save_ptr (X_CAST (void **, &(p)), X_CAST (void *, (p)))
+  unwind_protect::save_ptr (reinterpret_cast<void **> (&(p)), \
+                            reinterpret_cast<void *> (p))
+
+#define unwind_protect_const_ptr(p) \
+  unwind_protect::save_ptr (const_cast<void **> (reinterpret_cast<const void **> (&(p))), \
+                            const_cast<void *> (reinterpret_cast<const void *> (p)))
 
 #endif