mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* eval.c (search_required): use RSTRING_PTR and RSTRING_STR.
* object.c (nil_plus): ditto. * ext/dl/cptr.c (rb_dlptr_s_to_ptr): ditto. * ext/openssl/ossl_x509ext.c (ossl_x509extfactory_create_ext): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6790891ef0
commit
974037a542
6 changed files with 14 additions and 7 deletions
11
ChangeLog
11
ChangeLog
|
@ -6,17 +6,24 @@ Thu Aug 31 20:50:46 2006 NAKAMURA Usaku <usa@ruby-lang.org>
|
|||
|
||||
Thu Aug 31 20:21:47 2006 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* file.c (test_identical, rb_file_s_truncate): use RSTRING_PTR and
|
||||
RSTRING_STR.
|
||||
* eval.c (search_required): use RSTRING_PTR and RSTRING_STR.
|
||||
|
||||
* file.c (test_identical, rb_file_s_truncate): ditto.
|
||||
|
||||
* io.c (pipe_open, rb_io_reopen): ditto.
|
||||
|
||||
* object.c (nil_plus): ditto.
|
||||
|
||||
* process.c (proc_spawn_n, rb_spawn): ditto.
|
||||
|
||||
* util.c (ruby_add_suffix): ditto.
|
||||
|
||||
* ext/Win32API/Win32API.c (Win32API_initialize): ditto.
|
||||
|
||||
* ext/dl/cptr.c (rb_dlptr_s_to_ptr): ditto.
|
||||
|
||||
* ext/openssl/ossl_x509ext.c (ossl_x509extfactory_create_ext): ditto.
|
||||
|
||||
* ext/tk/stubs.c, ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: ditto.
|
||||
|
||||
* ext/win32ole/win32ole.c (ole_val2olevariantdata): ditto.
|
||||
|
|
2
eval.c
2
eval.c
|
@ -6993,7 +6993,7 @@ search_required(VALUE fname, VALUE *path)
|
|||
OBJ_FREEZE(tmp);
|
||||
if (rb_find_file_ext(&tmp, loadable_ext+1)) {
|
||||
tmp = rb_file_expand_path(tmp, Qnil);
|
||||
ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
|
||||
ext = strrchr(ftptr = RSTRING_PTR(tmp), '.');
|
||||
if (!rb_feature_p(ftptr, ext, Qfalse))
|
||||
*path = tmp;
|
||||
return 's';
|
||||
|
|
|
@ -430,7 +430,7 @@ rb_dlptr_s_to_ptr(VALUE self, VALUE val)
|
|||
}
|
||||
else if( rb_obj_is_kind_of(val, rb_cString) == Qtrue ){
|
||||
char *ptr = StringValuePtr(val);
|
||||
return rb_dlptr_new(ptr, RSTRING(val)->len, NULL);
|
||||
return rb_dlptr_new(ptr, RSTRING_LEN(val), NULL);
|
||||
}
|
||||
else if( rb_respond_to(val, id_to_ptr) ){
|
||||
VALUE vptr = rb_funcall(val, id_to_ptr, 0);
|
||||
|
|
|
@ -241,7 +241,7 @@ ossl_x509extfactory_create_ext(int argc, VALUE *argv, VALUE self)
|
|||
ext = X509V3_EXT_nconf_nid(conf, ctx, nid, RSTRING_PTR(valstr));
|
||||
#else
|
||||
if (!empty_lhash) empty_lhash = lh_new(NULL, NULL);
|
||||
ext = X509V3_EXT_conf_nid(empty_lhash, ctx, nid, RSTRING(valstr)->ptr);
|
||||
ext = X509V3_EXT_conf_nid(empty_lhash, ctx, nid, RSTRING_PTR(valstr));
|
||||
#endif
|
||||
if (!ext){
|
||||
ossl_raise(eX509ExtError, "%s = %s",
|
||||
|
|
|
@ -98,7 +98,7 @@ syck_base64dec( char *s, long len )
|
|||
}
|
||||
}
|
||||
*end = '\0';
|
||||
/*RSTRING(buf)->len = ptr - RSTRING(buf)->ptr;*/
|
||||
/*RSTRING_LEN(buf) = ptr - RSTRING_PTR(buf);*/
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
|
2
object.c
2
object.c
|
@ -729,7 +729,7 @@ nil_plus(VALUE x, VALUE y)
|
|||
return y;
|
||||
default:
|
||||
rb_raise(rb_eTypeError, "tried to add %s(%s) to nil",
|
||||
RSTRING(rb_inspect(y))->ptr,
|
||||
RSTRING_PTR(rb_inspect(y)),
|
||||
rb_obj_classname(y));
|
||||
}
|
||||
/* not reached */
|
||||
|
|
Loading…
Reference in a new issue