diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 1998-01-14 18:49:25 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 1998-01-14 18:49:25 +0000 |
commit | a60c0954410db87be540ee8439afcd54350bbb8e (patch) | |
tree | 1a39a6e0941f3c706efe727a664534cce93143ee /mg.c | |
parent | 1393e20655efb4bcc2062605bfe887dd5e634bc1 (diff) | |
download | perl-a60c0954410db87be540ee8439afcd54350bbb8e.tar.gz |
TIEARRAY updates - almost works ...
p4raw-id: //depot/ansiperl@424
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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; } |