[coop] Change handles to be pointers (#3249)
authorAleksey Kliger (λgeek) <akliger@gmail.com>
Fri, 8 Jul 2016 14:36:04 +0000 (10:36 -0400)
committerGitHub <noreply@github.com>
Fri, 8 Jul 2016 14:36:04 +0000 (10:36 -0400)
commit9d496e241e105b97b6c11ce6debfe498ba554b0d
treec162631885e40eedd767549389df90c769514093
parent5aa397ecb7a5b88698b3c22eaf7b3f1ad78bc2c9
[coop] Change handles to be pointers (#3249)

Previously handles were pointer-sized structs.  Unfortunately not all
calling conventions treat pointer-sized structs as pointers, so if we
wanted to interact with handles from wrappers, we would have to do
something complicated.

With the new design, `TYPED_HANDLE_DECL(MonoFoo)` will expand to:
```c
    typedef struct {
        MonoFoo *__obj;
    } MonoFooHandlePayload;
    typedef MonoFooHandlePayload *MonoFooHandle;
```
mono/metadata/handle.c
mono/metadata/handle.h