[macruby-changes] [2597] MacRuby/trunk/parse.y
source_changes at macosforge.org
source_changes at macosforge.org
Mon Sep 21 18:58:14 PDT 2009
Revision: 2597
http://trac.macosforge.org/projects/ruby/changeset/2597
Author: lsansonetti at apple.com
Date: 2009-09-21 18:58:13 -0700 (Mon, 21 Sep 2009)
Log Message:
-----------
deleted unnecessary code
Modified Paths:
--------------
MacRuby/trunk/parse.y
Modified: MacRuby/trunk/parse.y
===================================================================
--- MacRuby/trunk/parse.y 2009-09-22 01:56:18 UTC (rev 2596)
+++ MacRuby/trunk/parse.y 2009-09-22 01:58:13 UTC (rev 2597)
@@ -5070,7 +5070,7 @@
static VALUE
lex_get_bstr(struct parser_params *parser, VALUE s)
{
- long beg = 0, len;
+ long beg = 0;
const long n = rb_bytestring_length(s);
if (lex_gets_ptr > 0) {
if (n == lex_gets_ptr) {
@@ -5079,15 +5079,13 @@
beg += lex_gets_ptr;
}
- UInt8 *data = rb_bytestring_byte_pointer(s);
+ const UInt8 *data = rb_bytestring_byte_pointer(s);
UInt8 *pos = memchr(data + beg, '\n', n - beg);
if (pos != NULL) {
lex_gets_ptr = pos - data + 1;
- len = pos - data - beg;
}
else {
lex_gets_ptr = n;
- len = lex_gets_ptr - beg;
}
return rb_bytestring_new_with_data(data + beg, lex_gets_ptr - beg);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090921/1de8950b/attachment-0001.html>
More information about the macruby-changes
mailing list