diff 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
line wrap: on
line diff
--- a/dstep/objc/message.d	Mon Aug 03 15:31:48 2009 +0200
+++ b/dstep/objc/message.d	Sun Jan 03 22:06:11 2010 +0100
@@ -35,7 +35,7 @@
     
 	R msgSendSuper (R = id, ARGS...) (SEL op, ARGS args)
 	{
-		alias extern (C) R function (id, SEL, ARGS) fp;
+		alias extern (C) R function (objc_super*, SEL, ARGS) fp;
 		return (cast(fp)&bindings.objc_msgSendSuper)(this, op, args);
 	}
 	
@@ -43,13 +43,13 @@
 	{		
 	    if (T.sizeof > STRUCT_SIZE_LIMIT)
 	    {
-	    	alias extern (C) void function (T*, id, SEL, ARGS) fp;
+	    	alias extern (C) void function (T*, objc_super*, SEL, ARGS) fp;
 	    	(cast(fp)&bindings.objc_msgSendSuper_stret)(&stretAddr, self, op, args);
 	    }
 	    
 	    else
 	    {
-	    	alias extern (C) T function (id, SEL, ARGS) fp;
+	    	alias extern (C) T function (objc_super*, SEL, ARGS) fp;
 	    	stretAddr = (*cast(fp)&bindings.objc_msgSendSuper)(self, op, args);
 	    }
 	}
@@ -99,14 +99,12 @@
 
 R method_invoke (R = id, ARGS...) (id receiver, Method m, ARGS args)
 {
-	static assert(receiver !is null);
 	alias extern (C) R function (id, SEL, ARGS) fp;
 	return (cast(fp)&bindings.method_invoke)(receiver, m, args);
 }
 
 void method_invoke_stret (ARGS...) (id receiver, Method m, ARGS args)
 {
-	static assert(receiver !is null);
 	alias extern (C) R function (id, SEL, ARGS) fp;
 	return (cast(fp)&bindings.method_invoke_stret)(receiver, m, args);
 }