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
d4180b6a
Commit
d4180b6a
authored
Feb 04, 2019
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the VMOD.file_id depend only on the $... lines, so people can
freely update comments and documentation.
parent
f3f8aa16
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
vmodtool.py
lib/libvcc/vmodtool.py
+3
-1
No files found.
lib/libvcc/vmodtool.py
View file @
d4180b6a
...
...
@@ -850,13 +850,14 @@ class vcc(object):
global
inputline
b
=
open
(
self
.
inputfile
,
"rb"
)
.
read
()
a
=
"
\n
"
+
b
.
decode
(
"utf-8"
)
self
.
file_id
=
hashlib
.
sha256
(
b
)
.
hexdigest
()
h
=
hashlib
.
sha256
()
s
=
a
.
split
(
"
\n
$"
)
self
.
copyright
=
s
.
pop
(
0
)
.
strip
()
while
s
:
ss
=
re
.
split
(
'
\n
([^
\t
])'
,
s
.
pop
(
0
),
maxsplit
=
1
)
toks
=
self
.
tokenize
(
ss
[
0
])
inputline
=
'$'
+
' '
.
join
(
toks
)
h
.
update
((
inputline
+
'
\n
'
)
.
encode
(
'utf-8'
))
docstr
=
""
.
join
(
ss
[
1
:])
stanzaclass
=
DISPATCH
.
get
(
toks
[
0
])
if
stanzaclass
is
None
:
...
...
@@ -864,6 +865,7 @@ class vcc(object):
stanzaclass
(
self
,
toks
,
docstr
)
inputline
=
None
self
.
csn
=
"Vmod_
%
s
%
s_Func"
%
(
self
.
sympfx
,
self
.
modname
)
self
.
file_id
=
h
.
hexdigest
()
def
tokenize
(
self
,
txt
,
seps
=
None
,
quotes
=
None
):
if
seps
is
None
:
...
...
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