summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1999-09-07 09:41:23 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1999-09-07 09:41:23 +0000
commit22f3ae8cbf6c65afe1b66665ab51a244fa3a6869 (patch)
tree69306625787572dbed0783f783430de5a15fc336 /sv.c
parent716026f96c8d48603497e3610163f08d8c9aeae6 (diff)
downloadperl-22f3ae8cbf6c65afe1b66665ab51a244fa3a6869.tar.gz
Fix a printf thinko: now quads must have the ll L q prefix.
(in other words, a bare %d is an int/unsigned) p4raw-id: //depot/cfgperl@4097
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c26
1 files changed, 3 insertions, 23 deletions
diff --git a/sv.c b/sv.c
index 355ab9a841..1f0d1a7b83 100644
--- a/sv.c
+++ b/sv.c
@@ -4906,7 +4906,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
case 'D':
#ifdef IV_IS_QUAD
- /* nothing */
+ intsize = 'q';
#else
intsize = 'l';
#endif
@@ -4916,11 +4916,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
if (args) {
switch (intsize) {
case 'h': iv = (short)va_arg(*args, int); break;
-#ifdef IV_IS_QUAD
- default: iv = va_arg(*args, IV); break;
-#else
default: iv = va_arg(*args, int); break;
-#endif
case 'l': iv = va_arg(*args, long); break;
case 'V': iv = va_arg(*args, IV); break;
#ifdef HAS_QUAD
@@ -4932,11 +4928,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
iv = (svix < svmax) ? SvIVx(svargs[svix++]) : 0;
switch (intsize) {
case 'h': iv = (short)iv; break;
-#ifdef IV_IS_QUAD
- default: break;
-#else
default: iv = (int)iv; break;
-#endif
case 'l': iv = (long)iv; break;
case 'V': break;
#ifdef HAS_QUAD
@@ -4958,7 +4950,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
case 'U':
#ifdef IV_IS_QUAD
- /* nothing */
+ intsize = 'q';
#else
intsize = 'l';
#endif
@@ -4973,7 +4965,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
case 'O':
#ifdef IV_IS_QUAD
- /* nothing */
+ intsize = 'q';
#else
intsize = 'l';
#endif
@@ -4990,11 +4982,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
if (args) {
switch (intsize) {
case 'h': uv = (unsigned short)va_arg(*args, unsigned); break;
-#ifdef UV_IS_QUAD
- default: uv = va_arg(*args, UV); break;
-#else
default: uv = va_arg(*args, unsigned); break;
-#endif
case 'l': uv = va_arg(*args, unsigned long); break;
case 'V': uv = va_arg(*args, UV); break;
#ifdef HAS_QUAD
@@ -5006,11 +4994,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
uv = (svix < svmax) ? SvUVx(svargs[svix++]) : 0;
switch (intsize) {
case 'h': uv = (unsigned short)uv; break;
-#ifdef UV_IS_QUAD
- default: break;
-#else
default: uv = (unsigned)uv; break;
-#endif
case 'l': uv = (unsigned long)uv; break;
case 'V': break;
#ifdef HAS_QUAD
@@ -5160,11 +5144,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
if (args) {
switch (intsize) {
case 'h': *(va_arg(*args, short*)) = i; break;
-#ifdef IV_IS_QUAD
- default: *(va_arg(*args, IV*)) = i; break;
-#else
default: *(va_arg(*args, int*)) = i; break;
-#endif
case 'l': *(va_arg(*args, long*)) = i; break;
case 'V': *(va_arg(*args, IV*)) = i; break;
#ifdef HAS_QUAD