summaryrefslogtreecommitdiff
path: root/ext/Storable
diff options
context:
space:
mode:
authorH.Merijn Brand <h.m.brand@xs4all.nl>2001-03-02 19:25:26 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2001-03-04 20:51:07 +0000
commit6e2c8ce6fba866a92c47c38076567c2392d3f577 (patch)
tree6fd8f7059ff2e730d654ac8757e8db9843065b2c /ext/Storable
parent405b39414254316617f9eff6eba0472cb6c4cb70 (diff)
downloadperl-6e2c8ce6fba866a92c47c38076567c2392d3f577.tar.gz
Re: Smoking patch 8898 for perl v5.7.0 on aix 4.3.0.0
Message-Id: <20010302182416.1BF4.H.M.BRAND@hccnet.nl> Casting problem. p4raw-id: //depot/perl@9024
Diffstat (limited to 'ext/Storable')
-rw-r--r--ext/Storable/Storable.xs7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/Storable/Storable.xs b/ext/Storable/Storable.xs
index 197c428ff5..62c5095ed1 100644
--- a/ext/Storable/Storable.xs
+++ b/ext/Storable/Storable.xs
@@ -3994,15 +3994,18 @@ static SV *retrieve_byte(stcxt_t *cxt, char *cname)
{
SV *sv;
int siv;
+ signed char tmp;
TRACEME(("retrieve_byte (#%d)", cxt->tagnum));
GETMARK(siv);
TRACEME(("small integer read as %d", (unsigned char) siv));
- sv = newSViv((unsigned char) siv - 128);
+ tmp = ((unsigned char)siv) - 128;
+ sv = newSViv (tmp);
+
SEEN(sv, cname); /* Associate this new scalar with tag "tagnum" */
- TRACEME(("byte %d", (unsigned char) siv - 128));
+ TRACEME(("byte %d", tmp));
TRACEME(("ok (retrieve_byte at 0x%"UVxf")", PTR2UV(sv)));
return sv;