From cf125a912aa86918dbc043166c2a1b6858ae65cf Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 17 May 2009 09:59:48 +0000 Subject: [PATCH] * node.h (nd_line): NODE_LMASK is not needed. * node.h (NOEX_SAFE): made int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ node.h | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 660e1ab6729c6e..81f3149367b1dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sun May 17 18:59:45 2009 Nobuyoshi Nakada + + * node.h (nd_line): NODE_LMASK is not needed. + + * node.h (NOEX_SAFE): made int. + Sun May 17 14:23:08 2009 Nobuyoshi Nakada * compile.c (rb_parse_in_eval): returns true in true eval, not in diff --git a/node.h b/node.h index c6a0fbbcffff37..58edbd466993c6 100644 --- a/node.h +++ b/node.h @@ -280,7 +280,7 @@ typedef struct RNode { #define NODE_LSHIFT (NODE_TYPESHIFT+7) #define NODE_LMASK (((SIGNED_VALUE)1<<(sizeof(VALUE)*CHAR_BIT-NODE_LSHIFT))-1) -#define nd_line(n) ((VALUE)(((RNODE(n))->flags>>NODE_LSHIFT)&NODE_LMASK)) +#define nd_line(n) (RNODE(n)->flags>>NODE_LSHIFT) #define nd_set_line(n,l) \ RNODE(n)->flags=((RNODE(n)->flags&~(-1<> 8) & 0x0F) +#define NOEX_SAFE(n) ((int)((n) >> 8) & 0x0F) #define NOEX_WITH(n, s) ((s << 8) | (n) | (ruby_running ? 0 : NOEX_BASIC)) #define NOEX_WITH_SAFE(n) NOEX_WITH(n, rb_safe_level())