Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test regexp_matched_num PR #257

Merged
merged 3 commits into from
Mar 26, 2023
Merged

Test regexp_matched_num PR #257

merged 3 commits into from
Mar 26, 2023

Conversation

RblSb
Copy link
Member

@RblSb RblSb commented Mar 4, 2022

Want to see green #223
Closes #223

@RblSb
Copy link
Member Author

RblSb commented Mar 4, 2022

Okay, so that nmatchs groups count doesnt exist in pcredata typedef structure, so it should be ported from hxcpp implementation.

...Can we skip neko part for regex.matchedNum() in HaxeFoundation/haxe#10290, guys?

@tobil4sk
Copy link
Member

tobil4sk commented Mar 4, 2022

The code changed slightly when porting to pcre2. I can try to fix it because it wasn't too long ago when I ported it.

@@ -311,7 +311,7 @@ static value regexp_matched_num( value o ) {
d = PCRE(o);
if( val_is_null(d->str) )
return alloc_int(-1);
return alloc_int(d->nmatches);
return alloc_int(d->nmatchs);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I renamed this field to n_groups while porting because I found it confusing (and because of the typo). Changing this from nmatchs to n_groups should be the fix.

@RblSb RblSb requested a review from tobil4sk January 4, 2023 05:19
Copy link
Member

@tobil4sk tobil4sk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm probably not the correct person to review this (and I don't have the permissions to merge it either), but in terms of pcre2 changes this looks good. 👍🏼

@RblSb
Copy link
Member Author

RblSb commented Mar 26, 2023

@Simn can this be merged?
This closes #223 and unblocks HaxeFoundation/haxe#10290, so maybe one less neko release will be required in future

@Simn Simn merged commit 98fe136 into HaxeFoundation:master Mar 26, 2023
@RblSb RblSb deleted the test branch March 26, 2023 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants