Differences From Artifact [d28fd7d86d]:
- File
src/OFInvocation.m
— part of check-in
[d6553b4578]
at
2017-09-10 22:32:56
on branch trunk
— Add OFInvocation
Only support for storing an invocation, no support for invoking yet. (user: js, size: 2661) [annotate] [blame] [check-ins using]
To Artifact [a554855707]:
- File
src/OFInvocation.m
— part of check-in
[95797a4d1c]
at
2017-09-11 02:05:07
on branch trunk
— OFInvocation: Initial support for invoking
So far this is only for x86_64 with the Apple runtime and does not yet
support all types. It also does not yet support passing arguments via
the stack. (user: js, size: 2839) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include <string.h> #import "OFInvocation.h" #import "OFArray.h" #import "OFData.h" #import "OFMethodSignature.h" @implementation OFInvocation @synthesize methodSignature = _methodSignature; + (instancetype)invocationWithMethodSignature: (OFMethodSignature *)signature { return [[[self alloc] initWithMethodSignature: signature] autorelease]; | > > > > | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #include <string.h> #import "OFInvocation.h" #import "OFArray.h" #import "OFData.h" #import "OFMethodSignature.h" #ifdef OF_INVOCATION_CAN_INVOKE extern void of_invocation_invoke(OFInvocation *); #endif @implementation OFInvocation @synthesize methodSignature = _methodSignature; + (instancetype)invocationWithMethodSignature: (OFMethodSignature *)signature { return [[[self alloc] initWithMethodSignature: signature] autorelease]; |
︙ | ︙ | |||
102 103 104 105 106 107 108 109 | memcpy([_returnValue items], buffer, [_returnValue itemSize]); } - (void)getReturnValue: (void *)buffer { memcpy(buffer, [_returnValue items], [_returnValue itemSize]); } @end | > > > > > > > | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | memcpy([_returnValue items], buffer, [_returnValue itemSize]); } - (void)getReturnValue: (void *)buffer { memcpy(buffer, [_returnValue items], [_returnValue itemSize]); } #ifdef OF_INVOCATION_CAN_INVOKE - (void)invoke { of_invocation_invoke(self); } #endif @end |