mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@3340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8c900ac9bf
commit
6e1f15fc8b
5 changed files with 76 additions and 34 deletions
6
pack.c
6
pack.c
|
@ -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]; \
|
||||
} \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue