mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
22f249ebd7
commit
25c50cd193
43 changed files with 484 additions and 512 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue