mono / CppSharp

Tools and libraries to glue C/C++ APIs to high-level languages
MIT License
3.14k stars 518 forks source link

Marshal parameters of type pointers to primitives (int*) as ref params (ref int) #509

Closed ddobrev closed 9 years ago

ddobrev commented 9 years ago

Should be pretty straightforward: get the addresses of ref params using unsafe code and pass that to the native code. The only corner case is default argument values because C# ref types cannot have them.

genuinelucifer commented 9 years ago

@ddobrev Please review #512 Is it acceptable? I merely changed the parameter usage to InOut for the pointers to primitives without a default value!

tritao commented 9 years ago

Fixed by https://github.com/mono/CppSharp/commit/dd941d9191dc8d8e97db07828f2804cba72b7237. Thanks @genuinelucifer.