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
d9a39361
Commit
d9a39361
authored
Aug 24, 2021
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated VSB_new() and VSB_delete()
parent
7b722799
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
50 deletions
+1
-50
vrt.h
include/vrt.h
+1
-0
vsb.h
include/vsb.h
+0
-2
vsb.c
lib/libvarnish/vsb.c
+0
-48
No files found.
include/vrt.h
View file @
d9a39361
...
...
@@ -54,6 +54,7 @@
* binary/load-time compatible, increment MAJOR version
*
* NEXT (2021-09-15)
* VSB_new() and VSB_delete() removed
* VCL_STRINGLIST, vrt_magic_string_end removed
* VRT_String(), VRT_StringList(), VRT_CollectString() removed
* VRT_CollectStrands() renamed to VRT_STRANDS_string()
...
...
include/vsb.h
View file @
d9a39361
...
...
@@ -59,7 +59,6 @@ extern "C" {
/*
* API functions
*/
struct
vsb
*
VSB_new
(
struct
vsb
*
,
char
*
,
int
,
int
)
v_deprecated_
;
struct
vsb
*
VSB_init
(
struct
vsb
*
,
void
*
,
ssize_t
);
struct
vsb
*
VSB_new_auto
(
void
);
void
VSB_clear
(
struct
vsb
*
);
...
...
@@ -76,7 +75,6 @@ int VSB_error(const struct vsb *);
int
VSB_finish
(
struct
vsb
*
);
char
*
VSB_data
(
const
struct
vsb
*
);
ssize_t
VSB_len
(
const
struct
vsb
*
);
void
VSB_delete
(
struct
vsb
*
)
v_deprecated_
;
void
VSB_fini
(
struct
vsb
*
);
void
VSB_destroy
(
struct
vsb
**
);
...
...
lib/libvarnish/vsb.c
View file @
d9a39361
...
...
@@ -208,35 +208,6 @@ VSB_newbuf(struct vsb *s, char *buf, int length, int flags)
return
(
s
);
}
/*
* Initialize an vsb.
* If buf is non-NULL, it points to a static or already-allocated string
* big enough to hold at least length characters.
*/
struct
vsb
*
VSB_new
(
struct
vsb
*
s
,
char
*
buf
,
int
length
,
int
flags
)
{
KASSERT
(
length
>=
0
,
(
"attempt to create an vsb of negative length (%d)"
,
length
));
KASSERT
((
flags
&
~
VSB_USRFLAGMSK
)
==
0
,
(
"%s called with invalid flags"
,
__func__
));
flags
&=
VSB_USRFLAGMSK
;
if
(
s
!=
NULL
)
return
(
VSB_newbuf
(
s
,
buf
,
length
,
flags
));
s
=
SBMALLOC
(
sizeof
(
*
s
));
if
(
s
==
NULL
)
return
(
NULL
);
if
(
VSB_newbuf
(
s
,
buf
,
length
,
flags
)
==
NULL
)
{
SBFREE
(
s
);
return
(
NULL
);
}
VSB_SETFLAG
(
s
,
VSB_DYNSTRUCT
);
return
(
s
);
}
struct
vsb
*
VSB_init
(
struct
vsb
*
s
,
void
*
buf
,
ssize_t
length
)
{
...
...
@@ -510,25 +481,6 @@ VSB_len(const struct vsb *s)
return
(
s
->
s_len
);
}
/*
* Clear an vsb, free its buffer if necessary.
*/
void
VSB_delete
(
struct
vsb
*
s
)
{
int
isdyn
;
assert_VSB_integrity
(
s
);
/* don't care if it's finished or not */
if
(
VSB_ISDYNAMIC
(
s
))
SBFREE
(
s
->
s_buf
);
isdyn
=
VSB_ISDYNSTRUCT
(
s
);
memset
(
s
,
0
,
sizeof
(
*
s
));
if
(
isdyn
)
SBFREE
(
s
);
}
void
VSB_fini
(
struct
vsb
*
s
)
{
...
...
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