diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-27 09:29:26 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-27 09:29:26 +0000 |
commit | 018837b84f26adf1dd43ff0f41b211a41f5289e8 (patch) | |
tree | 4e552ee5749181b14dd80da1eb05d0dc9ed86645 /node.h | |
parent | 6ffdbac5edcdeb0a9c916735cab125674c5a693d (diff) | |
download | bundler-018837b84f26adf1dd43ff0f41b211a41f5289e8.tar.gz |
* node.h (NODE_TYPESHIFT): allow 4 more bits for line numbers.
[ruby-talk:117841]
* ruby.h (FL_ABLE): nodes are not subject for flag operations.
* io.c (ARGF_FORWARD): should have specified argv explicitly,
since we no longer have frame->argv saved. [ruby-dev:24602]
* string.c (RESIZE_CAPA): check string attribute before modifying
capacity member of string structure. [ruby-dev:24594]
* ext/zlib/zlib.c (gzreader_gets): use memchr() to to gain
performance. [ruby-talk:117701]
* sprintf.c (rb_f_sprintf): raise ArgumentError for extra
arguments, unless (digit)$ style used.
* io.c (rb_io_fptr_finalize): leave stdin/stdout/stderr open in
interpreter termination. [ruby-dev:24579]
* eval.c (frame_free): Guy Decoux solved the leak problem.
Thanks. [ruby-core:03549]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'node.h')
-rw-r--r-- | node.h | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -156,18 +156,21 @@ typedef struct RNode { #define RNODE(obj) (R_CAST(RNode)(obj)) -#define nd_type(n) ((int)(((RNODE(n))->flags>>FL_USHIFT)&0x7f)) -#define nd_set_type(n,t) \ - RNODE(n)->flags=((RNODE(n)->flags&~FL_UMASK)|(((t)<<FL_USHIFT)&FL_UMASK)) +#define NODE_TYPESHIFT 7 +#define NODE_TYPEMASK (0xff<<NODE_TYPESHIFT) -#define NODE_NEWLINE FL_USER7 +#define nd_type(n) ((int)(((RNODE(n))->flags>>NODE_TYPESHIFT)&0x7f)) +#define nd_set_type(n,t) \ + RNODE(n)->flags=((RNODE(n)->flags&~NODE_TYPEMASK)|(((t)<<NODE_TYPESHIFT)&NODE_TYPEMASK)) -#define NODE_LSHIFT (FL_USHIFT+8) +#define NODE_LSHIFT (NODE_TYPESHIFT+8) #define NODE_LMASK (((long)1<<(sizeof(NODE*)*CHAR_BIT-NODE_LSHIFT))-1) #define nd_line(n) ((unsigned int)(((RNODE(n))->flags>>NODE_LSHIFT)&NODE_LMASK)) #define nd_set_line(n,l) \ RNODE(n)->flags=((RNODE(n)->flags&~(-1<<NODE_LSHIFT))|(((l)&NODE_LMASK)<<NODE_LSHIFT)) +#define NODE_NEWLINE FL_USER7 + #define nd_head u1.node #define nd_alen u2.argc #define nd_next u3.node |