* 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
This commit is contained in:
parent
6885f3b708
commit
d04cc54add
@ -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>
|
Tue Aug 12 18:14:00 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* tool/transcode-tblgen.rb (#transcode_tblgen): slight message
|
* tool/transcode-tblgen.rb (#transcode_tblgen): slight message
|
||||||
|
@ -67,11 +67,7 @@ static VALUE mSyslog_open(int argc, VALUE *argv, VALUE self)
|
|||||||
if (NIL_P(ident)) {
|
if (NIL_P(ident)) {
|
||||||
ident = rb_gv_get("$0");
|
ident = rb_gv_get("$0");
|
||||||
}
|
}
|
||||||
#ifdef SafeStringValue
|
|
||||||
SafeStringValue(ident);
|
SafeStringValue(ident);
|
||||||
#else
|
|
||||||
Check_SafeStr(ident);
|
|
||||||
#endif
|
|
||||||
syslog_ident = strdup(RSTRING_PTR(ident));
|
syslog_ident = strdup(RSTRING_PTR(ident));
|
||||||
|
|
||||||
if (NIL_P(opt)) {
|
if (NIL_P(opt)) {
|
||||||
@ -224,12 +220,12 @@ define_syslog_shortcut_method(LOG_DEBUG, debug)
|
|||||||
|
|
||||||
static VALUE mSyslogConstants_LOG_MASK(VALUE klass, VALUE pri)
|
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)
|
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 */
|
/* Init for package syslog */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user