Mercurial > projects > dstep
comparison dstep/objc/message.d @ 16:19885b43130e
Huge update, the bridge actually works now
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sun, 03 Jan 2010 22:06:11 +0100 |
parents | c0cfd40362ee |
children | b9de51448c6b |
comparison
equal
deleted
inserted
replaced
15:7ff919f595d5 | 16:19885b43130e |
---|---|
33 // for dwt compatibility | 33 // for dwt compatibility |
34 alias super_class cls; | 34 alias super_class cls; |
35 | 35 |
36 R msgSendSuper (R = id, ARGS...) (SEL op, ARGS args) | 36 R msgSendSuper (R = id, ARGS...) (SEL op, ARGS args) |
37 { | 37 { |
38 alias extern (C) R function (id, SEL, ARGS) fp; | 38 alias extern (C) R function (objc_super*, SEL, ARGS) fp; |
39 return (cast(fp)&bindings.objc_msgSendSuper)(this, op, args); | 39 return (cast(fp)&bindings.objc_msgSendSuper)(this, op, args); |
40 } | 40 } |
41 | 41 |
42 void msgSendSuper_stret (T, ARGS...) (out T stretAddr, id self, SEL op, ARGS args) | 42 void msgSendSuper_stret (T, ARGS...) (out T stretAddr, id self, SEL op, ARGS args) |
43 { | 43 { |
44 if (T.sizeof > STRUCT_SIZE_LIMIT) | 44 if (T.sizeof > STRUCT_SIZE_LIMIT) |
45 { | 45 { |
46 alias extern (C) void function (T*, id, SEL, ARGS) fp; | 46 alias extern (C) void function (T*, objc_super*, SEL, ARGS) fp; |
47 (cast(fp)&bindings.objc_msgSendSuper_stret)(&stretAddr, self, op, args); | 47 (cast(fp)&bindings.objc_msgSendSuper_stret)(&stretAddr, self, op, args); |
48 } | 48 } |
49 | 49 |
50 else | 50 else |
51 { | 51 { |
52 alias extern (C) T function (id, SEL, ARGS) fp; | 52 alias extern (C) T function (objc_super*, SEL, ARGS) fp; |
53 stretAddr = (*cast(fp)&bindings.objc_msgSendSuper)(self, op, args); | 53 stretAddr = (*cast(fp)&bindings.objc_msgSendSuper)(self, op, args); |
54 } | 54 } |
55 } | 55 } |
56 } | 56 } |
57 | 57 |
97 } | 97 } |
98 } | 98 } |
99 | 99 |
100 R method_invoke (R = id, ARGS...) (id receiver, Method m, ARGS args) | 100 R method_invoke (R = id, ARGS...) (id receiver, Method m, ARGS args) |
101 { | 101 { |
102 static assert(receiver !is null); | |
103 alias extern (C) R function (id, SEL, ARGS) fp; | 102 alias extern (C) R function (id, SEL, ARGS) fp; |
104 return (cast(fp)&bindings.method_invoke)(receiver, m, args); | 103 return (cast(fp)&bindings.method_invoke)(receiver, m, args); |
105 } | 104 } |
106 | 105 |
107 void method_invoke_stret (ARGS...) (id receiver, Method m, ARGS args) | 106 void method_invoke_stret (ARGS...) (id receiver, Method m, ARGS args) |
108 { | 107 { |
109 static assert(receiver !is null); | |
110 alias extern (C) R function (id, SEL, ARGS) fp; | 108 alias extern (C) R function (id, SEL, ARGS) fp; |
111 return (cast(fp)&bindings.method_invoke_stret)(receiver, m, args); | 109 return (cast(fp)&bindings.method_invoke_stret)(receiver, m, args); |
112 } | 110 } |
113 | 111 |
114 R objc_msgSendv (R = id, T) (id self, SEL op, size_t arg_size, T arg_frame) | 112 R objc_msgSendv (R = id, T) (id self, SEL op, size_t arg_size, T arg_frame) |