summaryrefslogtreecommitdiff
path: root/ext/syslog/syslog.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-08-31 10:30:33 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-08-31 10:30:33 +0000
commit25c50cd193d89ad0737219142bab191f12b8abe8 (patch)
treea14ada29405880c7f56c615067b6600815f54334 /ext/syslog/syslog.c
parent22f249ebd7a142faacdf5edd7e196bd2149feae5 (diff)
* ruby.h (struct RString): embed small strings.
(RSTRING_LEN): defined for accessing string members. (RSTRING_PTR): ditto. * string.c: use RSTRING_LEN and RSTRING_PTR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/syslog/syslog.c')
-rw-r--r--ext/syslog/syslog.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/syslog/syslog.c b/ext/syslog/syslog.c
index 477489d..d4945ae 100644
--- a/ext/syslog/syslog.c
+++ b/ext/syslog/syslog.c
@@ -32,7 +32,7 @@ static void syslog_write(int pri, int argc, VALUE *argv)
str = rb_f_sprintf(argc, argv);
- syslog(pri, "%s", RSTRING(str)->ptr);
+ syslog(pri, "%s", RSTRING_PTR(str));
}
/* Syslog module methods */
@@ -70,7 +70,7 @@ static VALUE mSyslog_open(int argc, VALUE *argv, VALUE self)
#else
Check_SafeStr(ident);
#endif
- syslog_ident = strdup(RSTRING(ident)->ptr);
+ syslog_ident = strdup(RSTRING_PTR(ident));
if (NIL_P(opt)) {
syslog_options = LOG_PID | LOG_CONS;