Skip to content

Calling an Objective C IMP with floating point return value

Nat! edited this page Mar 17, 2017 · 1 revision

Floating point return values are always passed via the metabi parameter block.

Convert:

   return( (float (*)(id, SEL)) (*method)( obj, sel);

to

#ifdef __MULLE_OBJC__
   mulle_objc_metaabi_param_block( void *,   
                                   float)  param;
   (*method)( *obj, sel, &param);
   return( param.rval);
#else
   return( (float (*)(id, SEL)) (*method)( obj, sel);
#endif
}
Clone this wiki locally