13 messages in org.perl.perl5-portersRe: Find the line number of the curre...
FromSent OnAttachments
Tim BunceMay 2, 2007 4:56 pm 
Artur BergmanMay 2, 2007 6:59 pm 
Dave MitchellMay 3, 2007 3:43 am 
Paul JohnsonMay 3, 2007 4:07 am 
Tim BunceMay 3, 2007 4:15 am 
Artur BergmanMay 3, 2007 10:34 am 
Artur BergmanMay 3, 2007 10:49 am 
Tim BunceMay 3, 2007 1:46 pm 
Tim BunceAug 8, 2007 6:13 am 
Tim BunceAug 8, 2007 6:33 am 
Dave MitchellAug 8, 2007 8:33 am 
Tim BunceJul 16, 2008 2:59 pm 
Paul JohnsonJul 17, 2008 2:48 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Find the line number of the current block from XS code?Actions...
From:Dave Mitchell (dav@iabyn.com)
Date:Aug 8, 2007 8:33:53 am
List:org.perl.perl5-porters

On Wed, Aug 08, 2007 at 02:13:40PM +0100, Tim Bunce wrote:

The context struct is focussed on restoring state when the context is exited. So I can get the op that the context will return to (cx_u.cx_blk.blku_oldcop) but not the first op that was executed in the context. Right?

Um, blku_oldcop points to the same COP (control op) that PL_curcop did just before block/sub entry, ie it's the last nextstate op that was executed before the block/sub was entered, and likely contains the value of the line number just before the block/sub start.