[Mono-dev] Where can I find GetTargetHandle, etc?

Jonathan Pryor jonpryor at vt.edu
Sat Jun 22 01:20:59 UTC 2013


On Jun 21, 2013, at 7:42 PM, Dan Barowy <mono at ettinsmoor.net> wrote:
>  [MethodImplAttribute(MethodImplOptions.InternalCall)]
>  private extern static int GetTargetHandle(object obj, int handle, GCHandleType type);

MethodImplOptions.InternalCall means "implemented in libmono*.so", so you need to look in mono/mono.

The easiest way is usually a recursive grep, which would find:

	https://github.com/mono/mono/blob/master/mono/metadata/gc.c#L527
	https://github.com/mono/mono/blob/master/mono/metadata/gc.c#L550

The C# method is hooked up to the above C method via 

	https://github.com/mono/mono/blob/master/mono/metadata/icall-def.h#L667
	https://github.com/mono/mono/blob/master/mono/metadata/icall.c

 - Jon



More information about the Mono-devel-list mailing list