Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
35db7bbb
Commit
35db7bbb
authored
Jan 31, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a regexp iterator (nice concept!) to separate the arguments
and add support for argument qualifiers in {...}
parent
34b365c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
vmod.py
lib/libvmod_std/vmod.py
+6
-9
No files found.
lib/libvmod_std/vmod.py
View file @
35db7bbb
...
...
@@ -185,16 +185,13 @@ while True:
args
=
list
()
while
True
:
l
=
partition
(
l
,
","
)
t
=
l
[
0
]
.
strip
(
)
if
t
not
in
ctypes
:
for
i
in
re
.
finditer
(
"([A-Z_]+)
\
s*({[^}]+})?(,|$)"
,
l
)
:
at
=
i
.
group
(
1
)
t
q
=
i
.
group
(
2
)
if
a
t
not
in
ctypes
:
raise
Exception
(
"Argument type '
%
s' not a valid type"
%
t
)
args
.
append
(
t
)
l
=
l
[
2
]
if
l
==
""
:
break
"Argument type '
%
s' not a valid type"
%
at
)
args
.
append
(
at
)
do_func
(
fname
,
rt_type
,
args
)
...
...
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