summaryrefslogtreecommitdiff
path: root/ext/syslog
diff options
context:
space:
mode:
Diffstat (limited to 'ext/syslog')
-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 */