Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-re
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-re
Commits
68cd0fae
Commit
68cd0fae
authored
Nov 05, 2013
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename re vre to disambiguate
parent
97956362
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
vmod_re.c
src/vmod_re.c
+7
-7
No files found.
src/vmod_re.c
View file @
68cd0fae
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
typedef
struct
re_t
{
typedef
struct
re_t
{
unsigned
magic
;
unsigned
magic
;
#define RE_MAGIC 0xd361bdcb
#define RE_MAGIC 0xd361bdcb
vre_t
*
re
;
vre_t
*
v
re
;
char
*
pattern
;
char
*
pattern
;
}
re_t
;
}
re_t
;
...
@@ -77,8 +77,8 @@ free_re(void *priv)
...
@@ -77,8 +77,8 @@ free_re(void *priv)
struct
re_t
*
re
;
struct
re_t
*
re
;
CAST_OBJ_NOTNULL
(
re
,
priv
,
RE_MAGIC
);
CAST_OBJ_NOTNULL
(
re
,
priv
,
RE_MAGIC
);
if
(
re
->
re
!=
NULL
)
if
(
re
->
v
re
!=
NULL
)
VRE_free
(
&
re
->
re
);
VRE_free
(
&
re
->
v
re
);
if
(
re
->
pattern
!=
NULL
)
if
(
re
->
pattern
!=
NULL
)
free
(
re
->
pattern
);
free
(
re
->
pattern
);
FREE_OBJ
(
re
);
FREE_OBJ
(
re
);
...
@@ -172,8 +172,8 @@ match(struct sess *sp, struct vmod_priv *priv_vcl, struct vmod_priv *priv_call,
...
@@ -172,8 +172,8 @@ match(struct sess *sp, struct vmod_priv *priv_vcl, struct vmod_priv *priv_call,
priv_call
->
priv
=
re
;
priv_call
->
priv
=
re
;
priv_call
->
free
=
free_re
;
priv_call
->
free
=
free_re
;
}
}
re
->
re
=
VRE_compile
(
pattern
,
0
,
&
error
,
&
erroffset
);
re
->
v
re
=
VRE_compile
(
pattern
,
0
,
&
error
,
&
erroffset
);
if
(
re
->
re
==
NULL
)
if
(
re
->
v
re
==
NULL
)
WSP
(
sp
,
SLT_VCL_error
,
WSP
(
sp
,
SLT_VCL_error
,
"vmod re: error compiling regex
\"
%s
\"
: "
"vmod re: error compiling regex
\"
%s
\"
: "
"%s (position %d)"
,
pattern
,
error
,
"%s (position %d)"
,
pattern
,
error
,
...
@@ -185,12 +185,12 @@ match(struct sess *sp, struct vmod_priv *priv_vcl, struct vmod_priv *priv_call,
...
@@ -185,12 +185,12 @@ match(struct sess *sp, struct vmod_priv *priv_vcl, struct vmod_priv *priv_call,
}
}
AZ
(
pthread_mutex_unlock
(
&
re_mutex
));
AZ
(
pthread_mutex_unlock
(
&
re_mutex
));
}
}
if
(
re
->
re
==
NULL
)
if
(
re
->
v
re
==
NULL
)
return
0
;
return
0
;
if
(
str
==
NULL
)
if
(
str
==
NULL
)
str
=
""
;
str
=
""
;
s
=
VRE_exec
(
re
->
re
,
str
,
strlen
(
str
),
0
,
0
,
&
ov
->
ovector
[
0
],
s
=
VRE_exec
(
re
->
v
re
,
str
,
strlen
(
str
),
0
,
0
,
&
ov
->
ovector
[
0
],
MAX_OV
,
&
params
->
vre_limits
);
MAX_OV
,
&
params
->
vre_limits
);
ov
->
count
=
s
;
ov
->
count
=
s
;
if
(
s
<
VRE_ERROR_NOMATCH
)
{
if
(
s
<
VRE_ERROR_NOMATCH
)
{
...
...
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