Fixed objc_msgSend in strict checking mode (#1834)

This commit is contained in:
attilaz 2019-07-27 02:20:56 +02:00 committed by Бранимир Караџић
parent 7845b74b44
commit 22e1faca69
1 changed files with 4 additions and 2 deletions

View File

@ -2260,12 +2260,14 @@ namespace bgfx
NSAutoreleasePoolScope()
{
id obj = class_createInstance(objc_getClass("NSAutoreleasePool"), 0);
pool = objc_msgSend(obj, sel_getUid("init") );
typedef id(*objc_msgSend_init)(void*, SEL);
pool = ((objc_msgSend_init)objc_msgSend)(obj, sel_getUid("init") );
}
~NSAutoreleasePoolScope()
{
objc_msgSend(pool, sel_getUid("release") );
typedef void(*objc_msgSend_release)(void*, SEL);
((objc_msgSend_release)objc_msgSend)(pool, sel_getUid("release") );
}
id pool;