summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>1998-01-14 18:49:25 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>1998-01-14 18:49:25 +0000
commita60c0954410db87be540ee8439afcd54350bbb8e (patch)
tree1a39a6e0941f3c706efe727a664534cce93143ee /mg.c
parent1393e20655efb4bcc2062605bfe887dd5e634bc1 (diff)
downloadperl-a60c0954410db87be540ee8439afcd54350bbb8e.tar.gz
TIEARRAY updates - almost works ...
p4raw-id: //depot/ansiperl@424
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/mg.c b/mg.c
index 289dd3b490..af2dddc87e 100644
--- a/mg.c
+++ b/mg.c
@@ -1009,8 +1009,10 @@ magic_getpack(SV *sv, MAGIC *mg)
int
magic_setpack(SV *sv, MAGIC *mg)
-{
+{
+ ENTER;
magic_methcall(mg, "STORE", G_SCALAR|G_DISCARD, 3, sv);
+ LEAVE;
return 0;
}
@@ -1031,7 +1033,7 @@ magic_sizepack(SV *sv, MAGIC *mg)
SAVETMPS;
if (magic_methcall(mg, "FETCHSIZE", G_SCALAR, 2, NULL)) {
sv = *stack_sp--;
- retval = (U32) SvIV(sv);
+ retval = (U32) SvIV(sv)-1;
}
FREETMPS;
LEAVE;
@@ -1045,9 +1047,9 @@ int magic_wipepack(SV *sv, MAGIC *mg)
PUSHMARK(sp);
XPUSHs(mg->mg_obj);
PUTBACK;
-
+ ENTER;
perl_call_method("CLEAR", G_SCALAR|G_DISCARD);
-
+ LEAVE;
return 0;
}