I'm making a mac OSX plugin for a large C library that has many const char* 's as return types.
I'm testing with two simple functions but they both cause unity to hang and then crash when I call them. Anyone done this before and have it working?
Data Marshalling const char* return type
I'm testing with two simple functions but they both cause unity to hang and then crash when I call them. Anyone done this before and have it working?
Code (CSharp):
- const char* getString()
- {
- return "Got String"
- }
- const char* getStringOnHeap()
- {
- char* foo = malloc(sizeof(char) * 20);
- foo = "Got heap String";
- return foo;
- }
Code (CSharp):
- [DLLImport(BundleTest)]
- public static...