summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-06-03 23:37:17 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-06-03 23:37:17 +0000
commit425d70b4c4324ccafae8099527a1f9ab13640b5c (patch)
treef41a6c5d0e15d27cc9a028184b6d98d42e2cf3d0 /mg.c
parent5e931b6b27bc1bb6cc2bcce917cc8f887bf37d90 (diff)
downloadperl-425d70b4c4324ccafae8099527a1f9ab13640b5c.tar.gz
Various "cast to pointer from integer of different size"
picked up by gcc -Wall (in Tru64 where pointers are 64 bits wide but I32 (int) only 32 bits wide). WARNING: the classnum and tagnum changes in Storable.xs may not be wise, they may be breaking binary compatibility (in 64-bit platforms), asked Raphael Manfredi about the changes. p4raw-id: //depot/perl@10417
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/mg.c b/mg.c
index b9a027e476..b743879800 100644
--- a/mg.c
+++ b/mg.c
@@ -40,7 +40,7 @@ struct magic_state {
/* MGS is typedef'ed to struct magic_state in perl.h */
STATIC void
-S_save_magic(pTHX_ I32 mgs_ix, SV *sv)
+S_save_magic(pTHX_ IV mgs_ix, SV *sv)
{
MGS* mgs;
assert(SvMAGICAL(sv));
@@ -93,7 +93,7 @@ Do magic after a value is retrieved from the SV. See C<sv_magic>.
int
Perl_mg_get(pTHX_ SV *sv)
{
- I32 mgs_ix;
+ IV mgs_ix;
MAGIC* mg;
MAGIC** mgp;
int mgp_valid = 0;
@@ -135,7 +135,7 @@ Do magic after a value is assigned to the SV. See C<sv_magic>.
int
Perl_mg_set(pTHX_ SV *sv)
{
- I32 mgs_ix;
+ IV mgs_ix;
MAGIC* mg;
MAGIC* nextmg;
@@ -175,7 +175,7 @@ Perl_mg_length(pTHX_ SV *sv)
for (mg = SvMAGIC(sv); mg; mg = mg->mg_moremagic) {
MGVTBL* vtbl = mg->mg_virtual;
if (vtbl && vtbl->svt_len) {
- I32 mgs_ix;
+ IV mgs_ix;
mgs_ix = SSNEW(sizeof(MGS));
save_magic(mgs_ix, sv);
@@ -190,7 +190,7 @@ Perl_mg_length(pTHX_ SV *sv)
return len;
}
-I32
+IV
Perl_mg_size(pTHX_ SV *sv)
{
MAGIC* mg;
@@ -199,7 +199,7 @@ Perl_mg_size(pTHX_ SV *sv)
for (mg = SvMAGIC(sv); mg; mg = mg->mg_moremagic) {
MGVTBL* vtbl = mg->mg_virtual;
if (vtbl && vtbl->svt_len) {
- I32 mgs_ix;
+ IV mgs_ix;
mgs_ix = SSNEW(sizeof(MGS));
save_magic(mgs_ix, sv);
@@ -234,7 +234,7 @@ Clear something magical that the SV represents. See C<sv_magic>.
int
Perl_mg_clear(pTHX_ SV *sv)
{
- I32 mgs_ix;
+ IV mgs_ix;
MAGIC* mg;
mgs_ix = SSNEW(sizeof(MGS));