Two questions:
- Is it possible to send objective-c message to C void * from C function?
- Is it possible to hint void * with
<SomeProtocol>in C-function declaration? In function body?
(pseudocode)
// myfunc.h
void myfunc(void *object, int param);
// myfunc.c
void myfunc(void *object, int param) {
// desired (pseudocode):
// [<SomeProtocol>(id)object method:param];
}
// objective-c controller
# include "myfunc.h"
// ....
@implementation
- (void)visible_to_outer_world {
Object *o = [Object new];
myfunc(o, 5);
}
// ....
@end
Not sure why you would want it, but if you’re compiling as Objective-C:
No.