From ed233832c7fe4d71f1f536650d0566b2e87ea46c Mon Sep 17 00:00:00 2001 From: Dave Mitchell Date: Tue, 23 May 2006 22:16:28 +0000 Subject: [PATCH] correct POPSTACK/POPMARK confusion in perlhack.pod p4raw-id: //depot/perl@28292 --- pod/perlhack.pod | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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. -- 2.7.4