[macruby-changes] [772] MacRuby/trunk/objc.m

source_changes at macosforge.org source_changes at macosforge.org
Wed Dec 24 18:30:58 PST 2008


Revision: 772
          http://trac.macosforge.org/projects/ruby/changeset/772
Author:   lsansonetti at apple.com
Date:     2008-12-24 18:30:58 -0800 (Wed, 24 Dec 2008)
Log Message:
-----------
fix a bug when looking at the bridgesupport signature for metho type (thanks Vincent Isambart)

Modified Paths:
--------------
    MacRuby/trunk/objc.m

Modified: MacRuby/trunk/objc.m
===================================================================
--- MacRuby/trunk/objc.m	2008-12-24 15:21:11 UTC (rev 771)
+++ MacRuby/trunk/objc.m	2008-12-25 02:30:58 UTC (rev 772)
@@ -1024,14 +1024,20 @@
 			char *type, size_t type_len)
 {
     if (bs_method != NULL) {
-	unsigned i;
-	if (n == -1 && bs_method->retval != NULL)
-	    return bs_method->retval->type;	    
-	for (i = 0; i < bs_method->args_count; i++) {
-	    if (bs_method->args[i].index == i
-		&& bs_method->args[i].type != NULL)
-		return bs_method->args[i].type; 
+	if (n == -1) {
+	    if (bs_method->retval != NULL) {
+		return bs_method->retval->type;
+	    }
 	}
+	else {	    
+	    unsigned i;
+	    for (i = 0; i < bs_method->args_count; i++) {
+		if (bs_method->args[i].index == n
+		    && bs_method->args[i].type != NULL) {
+		    return bs_method->args[i].type; 
+		}
+	    }
+	}
     }
     if (n == -1) {
 	method_getReturnType(method, type, type_len);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20081224/d87c623a/attachment.html>


More information about the macruby-changes mailing list