[ruamoko] Cast autoreleaseIMP to avoid ...

The ABI for the Ruamoko ISA set currently puts va_list into the
parameter stream whenever a varargs function is called. Unfortunately,
IMP is declared with ... and thus cannot be used directly unless all
methods become varargs, but I think that would cause even more
headaches.
This commit is contained in:
Bill Currie 2022-01-31 23:37:03 +09:00
parent 712d800491
commit 98215b46ad

View file

@ -77,10 +77,12 @@ BOOL (id object) object_is_meta_class = #0;
@end
typedef void arIMP(id, SEL, id);
@static BOOL allocDebug;
@static Class autoreleaseClass;
@static SEL autoreleaseSelector;
@static IMP autoreleaseIMP;
@static arIMP autoreleaseIMP;
@implementation Object
@ -89,7 +91,7 @@ BOOL (id object) object_is_meta_class = #0;
//allocDebug = localinfo ("AllocDebug");
autoreleaseClass = [AutoreleasePool class];
autoreleaseSelector = @selector(addObject:);
autoreleaseIMP = [autoreleaseClass methodForSelector: autoreleaseSelector];
autoreleaseIMP = (arIMP)[autoreleaseClass methodForSelector: autoreleaseSelector];
return;
}