[macruby-changes] [163] MacRuby/trunk/parse.y

source_changes at macosforge.org source_changes at macosforge.org
Tue Apr 22 14:44:08 PDT 2008


Revision: 163
          http://trac.macosforge.org/projects/ruby/changeset/163
Author:   lsansonetti at apple.com
Date:     2008-04-22 14:44:07 -0700 (Tue, 22 Apr 2008)

Log Message:
-----------
fixed line parser

Modified Paths:
--------------
    MacRuby/trunk/parse.y

Modified: MacRuby/trunk/parse.y
===================================================================
--- MacRuby/trunk/parse.y	2008-04-22 21:17:15 UTC (rev 162)
+++ MacRuby/trunk/parse.y	2008-04-22 21:44:07 UTC (rev 163)
@@ -4792,7 +4792,7 @@
 lex_get_str(struct parser_params *parser, VALUE s)
 {
 #if WITH_OBJC
-    long beg, n;
+    long beg, len, n;
     CFRange search_range;  
     VALUE v;
  
@@ -4808,10 +4808,12 @@
 	CFRangeMake(beg, n - beg),
 	0,
 	&search_range)) {
-	lex_gets_ptr = search_range.location;
+	lex_gets_ptr = search_range.location + 1;
+	len = search_range.location - beg;
     }
     else {
-        lex_gets_ptr = n;
+	lex_gets_ptr = n;
+	len = lex_gets_ptr - beg;	
     }
     v = (VALUE)CFStringCreateWithSubstring(NULL, (CFStringRef)s, 
 	CFRangeMake(beg, lex_gets_ptr - beg));

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macruby-changes/attachments/20080422/729a24d9/attachment.html


More information about the macruby-changes mailing list