From: Dave Mitchell Date: Tue, 23 May 2006 22:16:28 +0000 (+0000) Subject: correct POPSTACK/POPMARK confusion in perlhack.pod X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ed233832c7fe4d71f1f536650d0566b2e87ea46c;p=p5sagit%2Fp5-mst-13.2.git correct POPSTACK/POPMARK confusion in perlhack.pod p4raw-id: //depot/perl@28292 --- diff --git a/pod/perlhack.pod b/pod/perlhack.pod index a976c77..df76d0f 100644 --- a/pod/perlhack.pod +++ b/pod/perlhack.pod @@ -1344,8 +1344,8 @@ stack usable by each function. For instance, when dealing with a tied variable, (internally, something with "P" magic) Perl has to call methods for accesses to the tied variables. However, we need to separate the arguments exposed to the method to the argument exposed to the -original function - the store or fetch or whatever it may be. Here's how -the tied C is implemented; see C in F: +original function - the store or fetch or whatever it may be. Here's +roughly how the tied C is implemented; see C in F: 1 PUSHMARK(SP); 2 EXTEND(SP,2); @@ -1355,7 +1355,7 @@ the tied C is implemented; see C in F: 6 ENTER; 7 call_method("PUSH", G_SCALAR|G_DISCARD); 8 LEAVE; - 9 POPSTACK; + 9 (void)POPMARK; The lines which concern the mark stack are the first, fifth and last lines: they save away, restore and remove the current position of the @@ -1397,7 +1397,7 @@ Perl space: C takes care of that, and it's described in L. We call the C method in scalar context, and we're going to discard its return value. - 9 POPSTACK; + 9 (void)POPMARK; Finally, we remove the value we placed on the mark stack, since we don't need it any more.