[Mono-dev] [PATCH] remove cast from InterlockedExchangePointer call

Olaf Hering olh at novell.com
Tue Jul 15 04:24:31 EDT 2008


InterlockedExchangePointer() returns a gpointer already,
remove unneeded cast in mono_delegate_free_ftnptr()

---
 mono-trunk/mono/metadata/marshal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mono-trunk/mono/metadata/marshal.c
+++ b/mono-trunk/mono/metadata/marshal.c
@@ -830,7 +830,7 @@ mono_delegate_free_ftnptr (MonoDelegate
 
 	delegate_hash_table_remove (delegate);
 
-	ptr = (gpointer)InterlockedExchangePointer (&delegate->delegate_trampoline, NULL);
+	ptr = InterlockedExchangePointer (&delegate->delegate_trampoline, NULL);
 
 	if (!delegate->target) {
 		/* The wrapper method is shared between delegates -> no need to free it */


More information about the Mono-devel-list mailing list