summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--ext/syslog/syslog.c8
2 files changed, 10 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 67dcfbb..28b865b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Tue Aug 12 18:32:03 2008 Akinori MUSHA <knu@iDaemons.org>
+
+ * 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.
+
Tue Aug 12 18:14:00 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* tool/transcode-tblgen.rb (#transcode_tblgen): slight message
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 */