Experimental: don't use $.*s of fprintf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
63d0ea4c03
commit
64bbd55c85
@ -676,7 +676,7 @@ rb_vm_bugreport(void)
|
|||||||
int i;
|
int i;
|
||||||
VALUE name;
|
VALUE name;
|
||||||
long len;
|
long len;
|
||||||
const int max_name_length = 128;
|
const int max_name_length = 1024;
|
||||||
# define LIMITED_NAME_LENGTH(s) \
|
# define LIMITED_NAME_LENGTH(s) \
|
||||||
(((len = RSTRING_LEN(s)) > max_name_length) ? max_name_length : (int)len)
|
(((len = RSTRING_LEN(s)) > max_name_length) ? max_name_length : (int)len)
|
||||||
|
|
||||||
@ -688,8 +688,8 @@ rb_vm_bugreport(void)
|
|||||||
for (i=0; i<RARRAY_LEN(vm->loaded_features); i++) {
|
for (i=0; i<RARRAY_LEN(vm->loaded_features); i++) {
|
||||||
name = RARRAY_PTR(vm->loaded_features)[i];
|
name = RARRAY_PTR(vm->loaded_features)[i];
|
||||||
if (RB_TYPE_P(name, T_STRING)) {
|
if (RB_TYPE_P(name, T_STRING)) {
|
||||||
fprintf(stderr, " %4d %.*s\n", i,
|
fprintf(stderr, " %4d %s\n", i,
|
||||||
LIMITED_NAME_LENGTH(name), RSTRING_PTR(name));
|
RSTRING_PTR(name));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
fprintf(stderr, " %4d #<%s:%p>\n", i,
|
fprintf(stderr, " %4d #<%s:%p>\n", i,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user