diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-27 02:42:16 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-27 02:42:16 +0000 |
commit | f933f9d3a5e5d71bcebc5d0a3206149870c412e0 (patch) | |
tree | 045c16c6de9011cf95261b5bc71aaed28be07835 /object.c | |
parent | d68e049c5f5ec5a0f2c1c7f2ebb0b08e735ef959 (diff) |
* gc.c (id2ref): must not assign pointers to long int. use
LONG_LONG instead if SIZEOF_LONG < SIZEOF_VOIDP.
[ruby-talk:149645]
* ruby.h: use LONG_LONG to simplify the change.
[ruby-talk:149645]
* eval.c (rb_f_throw): replace all '0x%lx' by '%p'.
[ruby-talk:149553]
* missing/vsnprintf.c (BSD_vfprintf): '%p' need to handle 64bit
size pointer. [ruby-talk:149553]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -359,7 +359,7 @@ rb_any_to_s(obj) len = strlen(cname)+6+16; str = rb_str_new(0, len); /* 6:tags 16:addr */ - snprintf(RSTRING(str)->ptr, len+1, "#<%s:0x%lx>", cname, obj); + snprintf(RSTRING(str)->ptr, len+1, "#<%s:%p>", cname, obj); RSTRING(str)->len = strlen(RSTRING(str)->ptr); if (OBJ_TAINTED(obj)) OBJ_TAINT(str); @@ -442,13 +442,13 @@ rb_obj_inspect(obj) if (rb_inspecting_p(obj)) { len = strlen(c)+10+16+1; str = rb_str_new(0, len); /* 10:tags 16:addr 1:nul */ - snprintf(RSTRING(str)->ptr, len, "#<%s:0x%lx ...>", c, obj); + snprintf(RSTRING(str)->ptr, len, "#<%s:%p ...>", c, obj); RSTRING(str)->len = strlen(RSTRING(str)->ptr); return str; } len = strlen(c)+6+16+1; str = rb_str_new(0, len); /* 6:tags 16:addr 1:nul */ - snprintf(RSTRING(str)->ptr, len, "-<%s:0x%lx", c, obj); + snprintf(RSTRING(str)->ptr, len, "-<%s:%p", c, obj); RSTRING(str)->len = strlen(RSTRING(str)->ptr); return rb_protect_inspect(inspect_obj, obj, str); } |