diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 1999-04-30 18:26:09 -0400 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-10 12:07:13 +0000 |
commit | 25da4f389200e19df8aa50bcef9af9506f48ed2e (patch) | |
tree | 65b30771e2788ce1648d3a92a6cb6ca63f48ca23 /doio.c | |
parent | a1bd196e40598e773ccd679fc8778a94de7814af (diff) | |
download | perl-25da4f389200e19df8aa50bcef9af9506f48ed2e.tar.gz |
Self-consistent numeric conversion again
Message-Id: <199905010226.WAA19127@monk.mps.ohio-state.edu>
p4raw-id: //depot/perl@3378
Diffstat (limited to 'doio.c')
-rw-r--r-- | doio.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -913,7 +913,10 @@ do_print(register SV *sv, PerlIO *fp) if (SvIOK(sv)) { if (SvGMAGICAL(sv)) mg_get(sv); - PerlIO_printf(fp, "%ld", (long)SvIVX(sv)); + if (SvIsUV(sv)) /* XXXX 64-bit? */ + PerlIO_printf(fp, "%lu", (unsigned long)SvUVX(sv)); + else + PerlIO_printf(fp, "%ld", (long)SvIVX(sv)); return !PerlIO_error(fp); } /* FALL THROUGH */ |