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

Patterns ids #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

vpiserchia
Copy link

In this way the hs_compile_multi will return the identifier of the regexp matched.
By default it's a list of zeros, that is do not return the identifier.

@vpiserchia vpiserchia closed this Feb 10, 2017
@vpiserchia vpiserchia deleted the patterns_ids branch February 10, 2017 07:48
@vpiserchia vpiserchia restored the patterns_ids branch February 10, 2017 12:04
@vpiserchia vpiserchia reopened this Feb 10, 2017
@@ -46,14 +46,16 @@ def __init__(self, patterns=None, flags=None, mode=None):

if mode is None:
mode = self._hs.HS_MODE_BLOCK

if ids is None:
ids = [0] * len(patterns)
Copy link
Owner

Choose a reason for hiding this comment

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

What do you think about making the default a NULL pointer here instead of replicating Hyperscan's default? Seems more robust to me even if you'd have to special case it in _CompilePatterns then.

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.

None yet

3 participants