Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
Only Regex;Cursor objects end up in the match captures -- others are
Browse files Browse the repository at this point in the history
silently skipped.
  • Loading branch information
pmichaud committed May 24, 2010
1 parent 3fcffdb commit 183d47b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Regex/Cursor.pir
Expand Up @@ -129,16 +129,12 @@ for the Cursor if one hasn't been created yet.
unless cstack_it goto cstack_done
.local pmc subcur, submatch, names
subcur = shift cstack_it
$I0 = isa subcur, ['Regex';'Cursor']
unless $I0 goto cstack_loop
# If the subcursor isn't bound with a name, skip it
names = getattribute subcur, '$!names'
if null names goto cstack_loop
$I0 = isa subcur, ['Regex';'Cursor']
unless $I0 goto cstack_1
submatch = subcur.'MATCH'()
goto cstack_2
cstack_1:
submatch = subcur
cstack_2:
# See if we have multiple binds
.local pmc names_it
subname = names
Expand Down

0 comments on commit 183d47b

Please sign in to comment.