summaryrefslogtreecommitdiff
path: root/pack.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-14 07:45:19 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-14 07:45:19 +0000
commit6e1f15fc8b7e62360d32bc6ca47b1309d25b7766 (patch)
treeb36848da9832cfd527b06835c0affd2a78a1689d /pack.c
parent8c900ac9bfa9566462d96d1f870dff87df81da8c (diff)
* 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
Diffstat (limited to 'pack.c')
-rw-r--r--pack.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pack.c b/pack.c
index d47eaee45a..dea599a4d5 100644
--- a/pack.c
+++ b/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]; \
} \