aboutsummaryrefslogtreecommitdiffstats
path: root/marshal.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-23 02:44:54 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-23 02:44:54 +0000
commit66137dc82ed7d173cba2db7ed68658e121806318 (patch)
tree8408e74babee904a460c7aa8d25103fe93344923 /marshal.c
parent489b9be6f6720b92cb40482c34c20bb38f5e2c9d (diff)
downloadruby-66137dc82ed7d173cba2db7ed68658e121806318.tar.gz
remove SIGN_EXTEND_CHAR macro
* marshal.c (r_long): cast to `signed char`, which is used already, instead of SIGN_EXTEND_CHAR. * parse.y: SIGN_EXTEND_CHAR is no longer used. [Fix GH-1302] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/marshal.c b/marshal.c
index 054b2aad0c..3560cb5d80 100644
--- a/marshal.c
+++ b/marshal.c
@@ -1174,19 +1174,11 @@ long_toobig(int size)
STRINGIZE(SIZEOF_LONG)", given %d)", size);
}
-#undef SIGN_EXTEND_CHAR
-#if __STDC__
-# define SIGN_EXTEND_CHAR(c) ((signed char)(c))
-#else /* not __STDC__ */
-/* As in Harbison and Steele. */
-# define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128)
-#endif
-
static long
r_long(struct load_arg *arg)
{
register long x;
- int c = SIGN_EXTEND_CHAR(r_byte(arg));
+ int c = (signed char)r_byte(arg);
long i;
if (c == 0) return 0;