[master] 924d0a9 Remove badly defined, hidden and now unused cursor skip functionality
Martin Blix Grydeland
martin at varnish-cache.org
Wed Oct 9 16:03:04 CEST 2013
commit 924d0a9c8a44ed838180b187f7a24911167dc105
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date: Wed Oct 9 14:32:35 2013 +0200
Remove badly defined, hidden and now unused cursor skip functionality
diff --git a/lib/libvarnishapi/vsl_api.h b/lib/libvarnishapi/vsl_api.h
index 40e3438..782fed8 100644
--- a/lib/libvarnishapi/vsl_api.h
+++ b/lib/libvarnishapi/vsl_api.h
@@ -39,14 +39,12 @@
/*lint -esym(534, vsl_diag) */
int vsl_diag(struct VSL_data *vsl, const char *fmt, ...)
__printflike(2, 3);
-int vsl_skip(struct VSL_cursor *c, ssize_t words);
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 int vslc_skip_f(struct VSL_cursor *, ssize_t words);
typedef int vslc_check_f(const struct VSL_cursor *, const struct VSLC_ptr *);
struct vslc_tbl {
@@ -56,7 +54,6 @@ struct vslc_tbl {
vslc_delete_f *delete;
vslc_next_f *next;
vslc_reset_f *reset;
- vslc_skip_f *skip;
vslc_check_f *check;
};
diff --git a/lib/libvarnishapi/vsl_cursor.c b/lib/libvarnishapi/vsl_cursor.c
index 14634fe..f15c686 100644
--- a/lib/libvarnishapi/vsl_cursor.c
+++ b/lib/libvarnishapi/vsl_cursor.c
@@ -211,30 +211,11 @@ vslc_vsm_reset(struct VSL_cursor *cursor)
return (0);
}
-static int
-vslc_vsm_skip(struct VSL_cursor *cursor, ssize_t words)
-{
- struct vslc_vsm *c;
-
- CAST_OBJ_NOTNULL(c, cursor->priv_data, VSLC_VSM_MAGIC);
- assert(&c->cursor == cursor);
- if (words < 0)
- return (-1);
-
- c->next.ptr += words;
- assert(c->next.ptr >= c->head->log);
- assert(c->next.ptr < c->end);
- c->cursor.rec.ptr = NULL;
-
- return (0);
-}
-
static const struct vslc_tbl vslc_vsm_tbl = {
.magic = VSLC_TBL_MAGIC,
.delete = vslc_vsm_delete,
.next = vslc_vsm_next,
.reset = vslc_vsm_reset,
- .skip = vslc_vsm_skip,
.check = vslc_vsm_check,
};
@@ -391,7 +372,6 @@ static const struct vslc_tbl vslc_file_tbl = {
.delete = vslc_file_delete,
.next = vslc_file_next,
.reset = vslc_file_reset,
- .skip = NULL,
.check = NULL,
};
@@ -488,17 +468,6 @@ VSL_Next(struct VSL_cursor *cursor)
}
int
-vsl_skip(struct VSL_cursor *cursor, ssize_t words)
-{
- const struct vslc_tbl *tbl;
-
- CAST_OBJ_NOTNULL(tbl, cursor->priv_tbl, VSLC_TBL_MAGIC);
- if (tbl->skip == NULL)
- return (-1);
- return ((tbl->skip)(cursor, words));
-}
-
-int
VSL_Check(const struct VSL_cursor *cursor, const struct VSLC_ptr *ptr)
{
const struct vslc_tbl *tbl;
diff --git a/lib/libvarnishapi/vsl_dispatch.c b/lib/libvarnishapi/vsl_dispatch.c
index 2007f09..3a572d6 100644
--- a/lib/libvarnishapi/vsl_dispatch.c
+++ b/lib/libvarnishapi/vsl_dispatch.c
@@ -245,7 +245,6 @@ static const struct vslc_tbl vslc_raw_tbl = {
.delete = NULL,
.next = vslc_raw_next,
.reset = vslc_raw_reset,
- .skip = NULL,
.check = NULL,
};
@@ -322,7 +321,6 @@ static const struct vslc_tbl vslc_vtx_tbl = {
.delete = NULL,
.next = vslc_vtx_next,
.reset = vslc_vtx_reset,
- .skip = NULL,
.check = NULL,
};
More information about the varnish-commit
mailing list