[Mono-bugs] [Bug 67039][Nor] Changed - [PATCH] Delegates returned from a PInvoke call are improperly marshalled
Wed, 29 Sep 2004 10:50:45 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by firstname.lastname@example.org.
--- shadow/67039 2004-09-29 09:13:31.000000000 -0400
+++ shadow/67039.tmp.9298 2004-09-29 10:50:45.000000000 -0400
@@ -80,6 +80,26 @@
- the functionality required is already implemented in
mono_ftnptr_to_delegate, so there is no need to add new functions/
fields to Delegate. Instead, mono_ftnptr_to_delegate should be modified
to include the code which is currently in mono_ftn_to_delegate.
- hash table access needs to be synchronized using marshal_mutex.
+------- Additional Comments From email@example.com 2004-09-29 10:50 -------
+ mono_ftnptr_to_delegate actually does something different, it takes the addr of the
+MonoObject and marshals back to a delegate. This is currently being called on line 2687
+of marshal.c. mono_ftn_to_delegate is what I added to deal with mapping a
+delegate_trampoline (what gets marshalled when a delegate is pinvoked) back to a
+MonoDelegate Its a difference of method_addr vs delegate_trampoline. The reason for
+the field added to Delegate was to ensure that anything added to the hashtable was
+removed when the gc was fired on an object, I dont see how anything in
+mono_ftnptr_to_delegate does things differently.
+ Is line 2687 a mistaken entry and is what you're saying that mono_ftnptr_to_delegate is
+actually supposed to be doing what I have mono_ftn_to_delegate doing?
+ I'll sync the ht to the mutex in the mean time;