summaryrefslogtreecommitdiff
path: root/signal.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-23 07:05:30 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-23 07:05:30 (GMT)
commit0d20fbe3bd654faf6be82a00ea140880a9d9481a (patch)
tree7a1d3af88f13eb9759458a0df01aaf0ccd23aa34 /signal.c
parent556515bf69a098c146b7856395a0e804e9159115 (diff)
eval.c: static IDs
* eval.c (ruby_static_id_signo, ruby_static_id_status): add static IDs, signo and status. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/signal.c b/signal.c
index dcce2b2..f64c24c 100644
--- a/signal.c
+++ b/signal.c
@@ -45,6 +45,9 @@
# include "nacl/signal.h"
#endif
+extern ID ruby_static_id_signo;
+#define id_signo ruby_static_id_signo
+
#ifdef NEED_RUBY_ATOMIC_OPS
rb_atomic_t
ruby_atomic_exchange(rb_atomic_t *ptr, rb_atomic_t val)
@@ -326,7 +329,7 @@ esignal_init(int argc, VALUE *argv, VALUE self)
sig = rb_sprintf("SIG%s", signm);
}
rb_call_super(1, &sig);
- rb_iv_set(self, "signo", INT2NUM(signo));
+ rb_ivar_set(self, id_signo, INT2NUM(signo));
return self;
}
@@ -341,7 +344,7 @@ esignal_init(int argc, VALUE *argv, VALUE self)
static VALUE
esignal_signo(VALUE self)
{
- return rb_iv_get(self, "signo");
+ return rb_ivar_get(self, id_signo);
}
/* :nodoc: */