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
82c77464
Commit
82c77464
authored
Nov 29, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Constification
parent
81564ae7
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
30 additions
and
29 deletions
+30
-29
vsl.h
include/vapi/vsl.h
+5
-5
vsl.c
lib/libvarnishapi/vsl.c
+2
-2
vsl_api.h
lib/libvarnishapi/vsl_api.h
+3
-3
vsl_cursor.c
lib/libvarnishapi/vsl_cursor.c
+9
-9
vsl_dispatch.c
lib/libvarnishapi/vsl_dispatch.c
+5
-5
vsl_glob_test.c
lib/libvarnishapi/vsl_glob_test.c
+1
-1
vxp.c
lib/libvarnishapi/vxp.c
+3
-2
vxp_parse.c
lib/libvarnishapi/vxp_parse.c
+1
-1
vxp_test.c
lib/libvarnishapi/vxp_test.c
+1
-1
No files found.
include/vapi/vsl.h
View file @
82c77464
...
...
@@ -245,12 +245,12 @@ struct VSL_cursor *VSL_CursorFile(struct VSL_data *vsl, const char *name,
* NULL: Error, see VSL_Error
*/
void
VSL_DeleteCursor
(
struct
VSL_cursor
*
c
);
void
VSL_DeleteCursor
(
const
struct
VSL_cursor
*
c
);
/*
* Delete the cursor pointed to by c
*/
int
VSL_ResetCursor
(
struct
VSL_cursor
*
c
);
int
VSL_ResetCursor
(
const
struct
VSL_cursor
*
c
);
/*
* Reset the cursor position to the head, so that the next call to
* VSL_Next returns the first record. For VSM cursor, it will
...
...
@@ -273,7 +273,7 @@ int VSL_Check(const struct VSL_cursor *c, const struct VSLC_ptr *ptr);
* 2: Valid
*/
int
VSL_Next
(
struct
VSL_cursor
*
c
);
int
VSL_Next
(
const
struct
VSL_cursor
*
c
);
/*
* Return raw pointer to next VSL record.
*
...
...
@@ -333,7 +333,7 @@ int VSL_PrintTerse(const struct VSL_data *vsl, const struct VSL_cursor *c,
* -5: I/O write error - see errno
*/
int
VSL_PrintAll
(
struct
VSL_data
*
vsl
,
struct
VSL_cursor
*
c
,
void
*
fo
);
int
VSL_PrintAll
(
struct
VSL_data
*
vsl
,
const
struct
VSL_cursor
*
c
,
void
*
fo
);
/*
* Calls VSL_Next on c until c is exhausted. In turn calls
* VSL_Print on all records where VSL_Match returns true.
...
...
@@ -393,7 +393,7 @@ int VSL_Write(const struct VSL_data *vsl, const struct VSL_cursor *c, void *fo);
* -5: I/O error - see VSL_Error
*/
int
VSL_WriteAll
(
struct
VSL_data
*
vsl
,
struct
VSL_cursor
*
c
,
void
*
fo
);
int
VSL_WriteAll
(
struct
VSL_data
*
vsl
,
const
struct
VSL_cursor
*
c
,
void
*
fo
);
/*
* Calls VSL_Next on c until c is exhausted. In turn calls
* VSL_Write on all records where VSL_Match returns true.
...
...
lib/libvarnishapi/vsl.c
View file @
82c77464
...
...
@@ -302,7 +302,7 @@ VSL_PrintTerse(const struct VSL_data *vsl, const struct VSL_cursor *c, void *fo)
}
int
VSL_PrintAll
(
struct
VSL_data
*
vsl
,
struct
VSL_cursor
*
c
,
void
*
fo
)
VSL_PrintAll
(
struct
VSL_data
*
vsl
,
const
struct
VSL_cursor
*
c
,
void
*
fo
)
{
int
i
;
...
...
@@ -436,7 +436,7 @@ VSL_Write(const struct VSL_data *vsl, const struct VSL_cursor *c, void *fo)
}
int
VSL_WriteAll
(
struct
VSL_data
*
vsl
,
struct
VSL_cursor
*
c
,
void
*
fo
)
VSL_WriteAll
(
struct
VSL_data
*
vsl
,
const
struct
VSL_cursor
*
c
,
void
*
fo
)
{
int
i
;
...
...
lib/libvarnishapi/vsl_api.h
View file @
82c77464
...
...
@@ -42,9 +42,9 @@ int vsl_diag(struct VSL_data *vsl, const char *fmt, ...)
void
vsl_vbm_bitset
(
int
bit
,
void
*
priv
);
void
vsl_vbm_bitclr
(
int
bit
,
void
*
priv
);
typedef
void
vslc_delete_f
(
struct
VSL_cursor
*
);
typedef
int
vslc_next_f
(
struct
VSL_cursor
*
);
typedef
int
vslc_reset_f
(
struct
VSL_cursor
*
);
typedef
void
vslc_delete_f
(
const
struct
VSL_cursor
*
);
typedef
int
vslc_next_f
(
const
struct
VSL_cursor
*
);
typedef
int
vslc_reset_f
(
const
struct
VSL_cursor
*
);
typedef
int
vslc_check_f
(
const
struct
VSL_cursor
*
,
const
struct
VSLC_ptr
*
);
struct
vslc_tbl
{
...
...
lib/libvarnishapi/vsl_cursor.c
View file @
82c77464
...
...
@@ -64,7 +64,7 @@ struct vslc_vsm {
};
static
void
vslc_vsm_delete
(
struct
VSL_cursor
*
cursor
)
vslc_vsm_delete
(
const
struct
VSL_cursor
*
cursor
)
{
struct
vslc_vsm
*
c
;
...
...
@@ -114,7 +114,7 @@ vslc_vsm_check(const struct VSL_cursor *cursor, const struct VSLC_ptr *ptr)
}
static
int
vslc_vsm_next
(
struct
VSL_cursor
*
cursor
)
vslc_vsm_next
(
const
struct
VSL_cursor
*
cursor
)
{
struct
vslc_vsm
*
c
;
int
i
;
...
...
@@ -189,7 +189,7 @@ vslc_vsm_next(struct VSL_cursor *cursor)
}
static
int
vslc_vsm_reset
(
struct
VSL_cursor
*
cursor
)
vslc_vsm_reset
(
const
struct
VSL_cursor
*
cursor
)
{
struct
vslc_vsm
*
c
;
unsigned
segment
;
...
...
@@ -290,7 +290,7 @@ struct vslc_file {
};
static
void
vslc_file_delete
(
struct
VSL_cursor
*
cursor
)
vslc_file_delete
(
const
struct
VSL_cursor
*
cursor
)
{
struct
vslc_file
*
c
;
...
...
@@ -320,7 +320,7 @@ vslc_file_readn(int fd, void *buf, size_t n)
}
static
int
vslc_file_next
(
struct
VSL_cursor
*
cursor
)
vslc_file_next
(
const
struct
VSL_cursor
*
cursor
)
{
struct
vslc_file
*
c
;
ssize_t
i
;
...
...
@@ -363,7 +363,7 @@ vslc_file_next(struct VSL_cursor *cursor)
}
static
int
vslc_file_reset
(
struct
VSL_cursor
*
cursor
)
vslc_file_reset
(
const
struct
VSL_cursor
*
cursor
)
{
(
void
)
cursor
;
/* XXX: Implement me */
...
...
@@ -439,7 +439,7 @@ VSL_CursorFile(struct VSL_data *vsl, const char *name, unsigned options)
}
void
VSL_DeleteCursor
(
struct
VSL_cursor
*
cursor
)
VSL_DeleteCursor
(
const
struct
VSL_cursor
*
cursor
)
{
const
struct
vslc_tbl
*
tbl
;
...
...
@@ -450,7 +450,7 @@ VSL_DeleteCursor(struct VSL_cursor *cursor)
}
int
VSL_ResetCursor
(
struct
VSL_cursor
*
cursor
)
VSL_ResetCursor
(
const
struct
VSL_cursor
*
cursor
)
{
const
struct
vslc_tbl
*
tbl
;
...
...
@@ -461,7 +461,7 @@ VSL_ResetCursor(struct VSL_cursor *cursor)
}
int
VSL_Next
(
struct
VSL_cursor
*
cursor
)
VSL_Next
(
const
struct
VSL_cursor
*
cursor
)
{
const
struct
vslc_tbl
*
tbl
;
...
...
lib/libvarnishapi/vsl_dispatch.c
View file @
82c77464
...
...
@@ -209,7 +209,7 @@ VRB_PROTOTYPE_STATIC(vtx_tree, vtx_key, entry, vtx_keycmp)
VRB_GENERATE_STATIC
(
vtx_tree
,
vtx_key
,
entry
,
vtx_keycmp
)
static
int
vslc_raw_next
(
struct
VSL_cursor
*
cursor
)
vslc_raw_next
(
const
struct
VSL_cursor
*
cursor
)
{
struct
vslc_raw
*
c
;
...
...
@@ -227,7 +227,7 @@ vslc_raw_next(struct VSL_cursor *cursor)
}
static
int
vslc_raw_reset
(
struct
VSL_cursor
*
cursor
)
vslc_raw_reset
(
const
struct
VSL_cursor
*
cursor
)
{
struct
vslc_raw
*
c
;
...
...
@@ -249,7 +249,7 @@ static const struct vslc_tbl vslc_raw_tbl = {
};
static
int
vslc_vtx_next
(
struct
VSL_cursor
*
cursor
)
vslc_vtx_next
(
const
struct
VSL_cursor
*
cursor
)
{
struct
vslc_vtx
*
c
;
const
uint32_t
*
ptr
;
...
...
@@ -300,7 +300,7 @@ vslc_vtx_next(struct VSL_cursor *cursor)
}
static
int
vslc_vtx_reset
(
struct
VSL_cursor
*
cursor
)
vslc_vtx_reset
(
const
struct
VSL_cursor
*
cursor
)
{
struct
vslc_vtx
*
c
;
...
...
@@ -573,7 +573,7 @@ vtx_retire(struct VSLQ *vslq, struct vtx **pvtx)
/* Lookup a vtx by vxid from the managed list */
static
struct
vtx
*
vtx_lookup
(
struct
VSLQ
*
vslq
,
unsigned
vxid
)
vtx_lookup
(
const
struct
VSLQ
*
vslq
,
unsigned
vxid
)
{
struct
vtx_key
lkey
,
*
key
;
struct
vtx
*
vtx
;
...
...
lib/libvarnishapi/vsl_glob_test.c
View file @
82c77464
...
...
@@ -44,7 +44,7 @@ cb(int tag, void *priv)
}
int
main
(
int
argc
,
char
*
argv
[]
)
main
(
int
argc
,
char
*
const
*
argv
)
{
int
i
;
...
...
lib/libvarnishapi/vxp.c
View file @
82c77464
...
...
@@ -53,7 +53,8 @@ vxp_ErrToken(const struct vxp *vxp, const struct token *t)
}
static
void
vxp_Pos
(
struct
vxp
*
vxp
,
struct
vsb
*
vsb
,
const
struct
token
*
t
,
int
tokoff
)
vxp_Pos
(
const
struct
vxp
*
vxp
,
struct
vsb
*
vsb
,
const
struct
token
*
t
,
int
tokoff
)
{
unsigned
pos
;
...
...
@@ -68,7 +69,7 @@ vxp_Pos(struct vxp *vxp, struct vsb *vsb, const struct token *t, int tokoff)
}
static
void
vxp_quote
(
struct
vxp
*
vxp
,
const
char
*
b
,
const
char
*
e
,
int
tokoff
)
vxp_quote
(
const
struct
vxp
*
vxp
,
const
char
*
b
,
const
char
*
e
,
int
tokoff
)
{
const
char
*
p
;
char
c
;
...
...
lib/libvarnishapi/vxp_parse.c
View file @
82c77464
...
...
@@ -50,7 +50,7 @@
static
void
vxp_expr_or
(
struct
vxp
*
vxp
,
struct
vex
**
pvex
);
static
struct
vex
*
vex_alloc
(
struct
vxp
*
vxp
)
vex_alloc
(
const
struct
vxp
*
vxp
)
{
struct
vex
*
vex
;
...
...
lib/libvarnishapi/vxp_test.c
View file @
82c77464
...
...
@@ -17,7 +17,7 @@ usage(void)
}
int
main
(
int
argc
,
char
**
argv
)
main
(
int
argc
,
char
*
const
*
argv
)
{
struct
vsb
*
vsb
;
struct
vex
*
vex
;
...
...
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