diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-01-14 07:45:19 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-01-14 07:45:19 +0000 |
commit | 8f5c55e48c3e30c0c26886903cf4a16d2836f4ed (patch) | |
tree | b36848da9832cfd527b06835c0affd2a78a1689d /pack.c | |
parent | 9d3dd935f6ff481958857df9a28444c19e93b92d (diff) | |
download | ruby-8f5c55e48c3e30c0c26886903cf4a16d2836f4ed.tar.gz ruby-8f5c55e48c3e30c0c26886903cf4a16d2836f4ed.tar.xz ruby-8f5c55e48c3e30c0c26886903cf4a16d2836f4ed.zip |
* parse.y (list_append): avoid O(n) search using node->nd_next->nd_end.
* parse.y (list_append): ditto.
* eval.c (rb_eval): NODE_ARRY nd_end adoption.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'pack.c')
-rw-r--r-- | pack.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -57,10 +57,10 @@ TOKEN_PASTE(swap,x)(z) \ unsigned char *s, *t; \ int i; \ \ - zp = (xtype *)malloc(sizeof(xtype));\ + zp = malloc(sizeof(xtype)); \ *zp = z; \ - s = (char *)zp; \ - t = (char *)malloc(sizeof(xtype)); \ + s = (unsigned char*)zp; \ + t = malloc(sizeof(xtype)); \ for (i=0; i<sizeof(xtype); i++) { \ t[sizeof(xtype)-i-1] = s[i]; \ } \ |