summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-12 09:35:12 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-12 09:35:12 +0000
commitd04cc54add30205e99848f9a44e08fd35efc133f (patch)
tree9029708192361051f603807158dcabfa1c96e5ee /ext
parent6885f3b708d053ed69a19cece8e4b67ab163a061 (diff)
* ext/syslog/syslog.c (mSyslog_open): Use of Check_SafeStr() is
deprecated. (mSyslogConstants_LOG_MASK, mSyslogConstants_LOG_UPTO): Use NUM2INT() instead of FIX2INT() when the type of an given object is not determined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/syslog/syslog.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/ext/syslog/syslog.c b/ext/syslog/syslog.c
index 4503e35..1bd82bf 100644
--- a/ext/syslog/syslog.c
+++ b/ext/syslog/syslog.c
@@ -67,11 +67,7 @@ static VALUE mSyslog_open(int argc, VALUE *argv, VALUE self)
if (NIL_P(ident)) {
ident = rb_gv_get("$0");
}
-#ifdef SafeStringValue
SafeStringValue(ident);
-#else
- Check_SafeStr(ident);
-#endif
syslog_ident = strdup(RSTRING_PTR(ident));
if (NIL_P(opt)) {
@@ -224,12 +220,12 @@ define_syslog_shortcut_method(LOG_DEBUG, debug)
static VALUE mSyslogConstants_LOG_MASK(VALUE klass, VALUE pri)
{
- return INT2FIX(LOG_MASK(FIX2INT(pri)));
+ return INT2FIX(LOG_MASK(NUM2INT(pri)));
}
static VALUE mSyslogConstants_LOG_UPTO(VALUE klass, VALUE pri)
{
- return INT2FIX(LOG_UPTO(FIX2INT(pri)));
+ return INT2FIX(LOG_UPTO(NUM2INT(pri)));
}
/* Init for package syslog */