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

source_changes at macosforge.org source_changes at macosforge.org
Sun May 25 20:26:16 PDT 2008


Revision: 219
          http://trac.macosforge.org/projects/ruby/changeset/219
Author:   lsansonetti at apple.com
Date:     2008-05-25 20:26:15 -0700 (Sun, 25 May 2008)

Log Message:
-----------
support for '%*s', fixing rdoc output

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

Modified: MacRuby/trunk/objc.m
===================================================================
--- MacRuby/trunk/objc.m	2008-05-26 01:19:20 UTC (rev 218)
+++ MacRuby/trunk/objc.m	2008-05-26 03:26:15 UTC (rev 219)
@@ -2684,6 +2684,7 @@
 
     while (i < format_str_len) {
 	bool sharp_modifier = false;
+	bool star_modifier = false;
 	if (format_str[i++] != '%')
 	    continue;
 	if (i < format_str_len && format_str[i] == '%') {
@@ -2697,6 +2698,11 @@
 		    sharp_modifier = true;
 		    break;
 
+		case '*':
+		    star_modifier = true;
+		    type = "i"; // C_INT;
+		    break;
+
 		case 'd':
 		case 'i':
 		case 'o':
@@ -2782,7 +2788,8 @@
 			"Too much tokens in the format string `%s' "\
 			"for the given %d argument(s)", format_str, len);
 		octypes[j++] = type;
-		break;
+		if (!star_modifier)
+		    break;
 	    }
 	}
     }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macruby-changes/attachments/20080525/15b1ca70/attachment.htm 


More information about the macruby-changes mailing list