Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/cre2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -718,11 +718,11 @@ cre2_set_add_simple(cre2_set *set, const char *pattern)


// Compile the regex set into a DFA. Must be called after add and before match.
int
bool
cre2_set_compile(cre2_set *set)
{
RE2::Set *s = TO_RE2_SET(set);
return static_cast<int>(s->Compile());
return s->Compile();
}

// Match the set of regex against text and store indices of matching regexes in match array.
Expand Down
4 changes: 2 additions & 2 deletions src/cre2.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@ cre2_decl int cre2_set_add(cre2_set *set, const char *pattern, size_t pattern_le
cre2_decl int cre2_set_add_simple(cre2_set *set, const char *pattern);

/* Compile the regex set into a DFA. Must be called after add and before match.
* Returns 1 on success, 0 on error */
cre2_decl int cre2_set_compile(cre2_set *set);
* Returns true on success, false on error */
cre2_decl bool cre2_set_compile(cre2_set *set);

/* Match the set of regex against text and store indices of matching regexes in match array.
* Returns the number of regexes which match. */
Expand Down