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

Define type Regex and implement RegexDestroy() #204

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

vpodzime
Copy link
Contributor

When migrating from PCRE to PCRE2 we had to make a change breaking API because all the functions working with REs were using the PCRE's type pcre. To avoid this change in the future, we define our own type Regex which we can later redefine without causing any API breakage.

This also requires a definition of RegexDestroy() for use instead of pcre2_code_free().

Ticket: ENT-10629
Changelog: API working with regular expressions uses a custom
type Regex instead of pcre2_code directly

When migrating from PCRE to PCRE2 we had to make a change
breaking API because all the functions working with REs were
using the PCRE's type `pcre`. To avoid this change in the future,
we define our own type `Regex` which we can later redefine
without causing any API breakage.

This also requires a definition of `RegexDestroy()` for use
instead of `pcre2_code_free()`.

Ticket: ENT-10629
Changelog: API working with regular expressions uses a custom
           type Regex instead of pcre2_code directly
@mender-test-bot
Copy link

There was an error running your pipeline, see logs for details.

Copy link
Contributor

@craigcomstock craigcomstock left a comment

Choose a reason for hiding this comment

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

looks great! thanks!

Copy link
Contributor

@olehermanse olehermanse left a comment

Choose a reason for hiding this comment

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

Cool, thanks!

@vpodzime vpodzime merged commit 1899478 into NorthernTechHQ:master Dec 11, 2023
7 checks passed
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