Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-re2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-re2
Commits
dddaf3cf
Unverified
Commit
dddaf3cf
authored
Jan 08, 2021
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor enum handling
parent
f343aa75
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
set.c
src/set.c
+9
-10
No files found.
src/set.c
View file @
dddaf3cf
...
...
@@ -109,34 +109,33 @@ decimal_digits(int n)
VCL_VOID
vmod_set__init
(
VRT_CTX
,
struct
vmod_re2_set
**
setp
,
const
char
*
vcl_name
,
VCL_ENUM
anchor
,
VCL_BOOL
utf8
,
VCL_BOOL
posix_syntax
,
VCL_ENUM
anchor
_a
,
VCL_BOOL
utf8
,
VCL_BOOL
posix_syntax
,
VCL_BOOL
longest_match
,
VCL_INT
max_mem
,
VCL_BOOL
literal
,
VCL_BOOL
never_nl
,
VCL_BOOL
dot_nl
,
VCL_BOOL
case_sensitive
,
VCL_BOOL
perl_classes
,
VCL_BOOL
word_boundary
,
VCL_BOOL
one_line
)
{
struct
vmod_re2_set
*
set
;
anchor_e
anchor
_e
;
anchor_e
anchor
;
const
char
*
err
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
AN
(
setp
);
AZ
(
*
setp
);
AN
(
vcl_name
);
AN
(
anchor
);
ALLOC_OBJ
(
set
,
VMOD_RE2_SET_MAGIC
);
AN
(
set
);
*
setp
=
set
;
if
(
strcmp
(
anchor
,
"none"
)
==
0
)
anchor
_e
=
NONE
;
else
if
(
strcmp
(
anchor
,
"start"
)
==
0
)
anchor
_e
=
START
;
else
if
(
strcmp
(
anchor
,
"both"
)
==
0
)
anchor
_e
=
BOTH
;
if
(
anchor_a
==
VENUM
(
none
)
)
anchor
=
NONE
;
else
if
(
anchor_a
==
VENUM
(
start
)
)
anchor
=
START
;
else
if
(
anchor_a
==
VENUM
(
both
)
)
anchor
=
BOTH
;
else
WRONG
(
"illegal anchor"
);
if
((
err
=
vre2set_init
(
&
set
->
set
,
anchor
_e
,
utf8
,
posix_syntax
,
if
((
err
=
vre2set_init
(
&
set
->
set
,
anchor
,
utf8
,
posix_syntax
,
longest_match
,
max_mem
,
literal
,
never_nl
,
dot_nl
,
case_sensitive
,
perl_classes
,
word_boundary
,
one_line
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment