diff dstep/objc/message.d @ 25:b9de51448c6b

Added an id constructor. Changed the string mixin to a template mixin. Added support for building as a dynamic library
author Jacob Carlborg <doob@me.com>
date Tue, 06 Apr 2010 11:37:27 +0200
parents 19885b43130e
children
line wrap: on
line diff
--- a/dstep/objc/message.d	Wed Feb 10 19:24:32 2010 +0100
+++ b/dstep/objc/message.d	Tue Apr 06 11:37:27 2010 +0200
@@ -25,9 +25,25 @@
 else version (PPC64) // Not sure about this
 	const int STRUCT_SIZE_LIMIT = 16;
 
+/**
+ * Specifies the superclass of an instance.
+ * 
+ * The compiler generates an objc_super data structure when it encounters the super
+ * keyword as the receiver of a message. It specifies the class definition of the
+ * particular superclass that should be messaged.
+ */
 struct objc_super
 {
+	/**
+	 * A pointer of type $(DSTEP_EXTERNAL_SYMBOL dstep.objc.objc, id).
+	 * Specifies an instance of a class.
+	 */
     id receiver;
+    
+    /**
+     * A pointer to an $(DIL_EXTERNAL_SYMBOL dstep.objc.objc, Class) data
+     * structure. Specifies the particular superclass of the instance to message.
+     */
     Class super_class;
     
     // for dwt compatibility
@@ -57,13 +73,13 @@
 
 R objc_msgSend (R = id, ARGS...) (id self, SEL op, ARGS args)
 {
-	alias extern(C) R function (id, SEL, ARGS) fp;
+	alias extern (C) R function (id, SEL, ARGS) fp;
 	return (cast(fp)&bindings.objc_msgSend)(self, op, args);
 }
 
 R objc_msgSendSuper (R = id, ARGS...) (objc_super* super_, SEL op, ARGS args)
 {
-	alias extern(C) R function (objc_super*, SEL, ARGS) fp;
+	alias extern (C) R function (objc_super*, SEL, ARGS) fp;
 	return (cast(fp)&bindings.objc_msgSendSuper)(super_, op, args);
 }
 
@@ -71,7 +87,7 @@
 {		
     if (T.sizeof > STRUCT_SIZE_LIMIT)
     {
-    	alias extern(C) void function (T*, id, SEL, ARGS) fp;
+    	alias extern (C) void function (T*, id, SEL, ARGS) fp;
     	(cast(void function (fp))&bindings.objc_msgSend_stret)(&stretAddr, self, op, args);
     }