diff --git a/runtime/src/main/cpp/Memory.cpp b/runtime/src/main/cpp/Memory.cpp index 882328e77af..61136f7b1b5 100644 --- a/runtime/src/main/cpp/Memory.cpp +++ b/runtime/src/main/cpp/Memory.cpp @@ -101,7 +101,7 @@ ObjHeader* AllocStringInstance( ObjHeader* InitInstance( ObjHeader** location, const TypeInfo* type_info, PlacementHint hint, - void (*ctor)(ObjHeader*)) { + ObjHeader* (*ctor)(ObjHeader*)) { ObjHeader* sentinel = reinterpret_cast(1); ObjHeader* value; // Wait until other initializers. diff --git a/runtime/src/main/cpp/Memory.h b/runtime/src/main/cpp/Memory.h index 51455522ce1..1b8275cd4b5 100644 --- a/runtime/src/main/cpp/Memory.h +++ b/runtime/src/main/cpp/Memory.h @@ -258,7 +258,7 @@ ObjHeader* AllocStringInstance(PlacementHint hint, const char* data, uint32_t length); ObjHeader* InitInstance( ObjHeader** location, const TypeInfo* type_info, PlacementHint hint, - void (*ctor)(ObjHeader*)); + ObjHeader* (*ctor)(ObjHeader*)); #ifdef __cplusplus }