Skip to content

Commit b863609

Browse files
committed
remove 3-arg setattribute from Regex::Cursor.MATCH
1 parent a66d699 commit b863609

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/Regex/Cursor.pir

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,9 @@ for the Cursor if one hasn't been created yet.
220220
=cut
221221

222222
.sub 'MATCH' :method :subid('Regex_Cursor_meth_MATCH')
223-
.local pmc cur_class, match
223+
.local pmc cur_class, match, match_class
224224
cur_class = get_global '$?CLASS'
225+
match_class = get_hll_global ["Regex"], "Match"
225226
match = getattribute self, cur_class, '$!match'
226227
if null match goto match_make
227228
$P0 = get_global '$!TRUE'
@@ -232,16 +233,16 @@ for the Cursor if one hasn't been created yet.
232233
match_make:
233234
match = self.'new_match'()
234235
setattribute self, cur_class, '$!match', match
235-
setattribute match, '$!cursor', self
236+
setattribute match, match_class, '$!cursor', self
236237
.local pmc target, from, to
237238
target = getattribute self, cur_class, '$!target'
238-
setattribute match, '$!target', target
239+
setattribute match, match_class, '$!target', target
239240
$I0 = repr_get_attr_int self, cur_class, '$!from'
240241
from = box $I0
241-
setattribute match, '$!from', from
242+
repr_bind_attr_int match, match_class, '$!from', $I0
242243
$I0 = repr_get_attr_int self, cur_class, '$!pos'
243244
to = box $I0
244-
setattribute match, '$!to', to
245+
repr_bind_attr_int match, match_class, '$!to', $I0
245246

246247
# Create any arrayed subcaptures.
247248
.local pmc caparray, caparray_it, caphash

0 commit comments

Comments
 (0)