[master] 9963084be vre: Constify VRE_Capture
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Mon Aug 30 12:46:05 UTC 2021
commit 9963084be898d86b3129b4894f5a1ec84c448b68
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Mon Aug 30 14:44:57 2021 +0200
vre: Constify VRE_Capture
Spotted by Flexelint.
diff --git a/include/vre.h b/include/vre.h
index 2a9450ad5..bb8702b22 100644
--- a/include/vre.h
+++ b/include/vre.h
@@ -60,8 +60,9 @@ vre_t *VRE_export(const vre_t *, size_t *);
int VRE_error(struct vsb *, int err);
int VRE_match(const vre_t *code, const char *subject, size_t length,
int options, const volatile struct vre_limits *lim);
-int VRE_capture(vre_t *code, const char *subject, size_t length, int options,
- txt *groups, size_t count, const volatile struct vre_limits *lim);
+int VRE_capture(const vre_t *code, const char *subject, size_t length,
+ int options, txt *groups, size_t count,
+ const volatile struct vre_limits *lim);
int VRE_sub(const vre_t *code, const char *subject, const char *replacement,
struct vsb *vsb, const volatile struct vre_limits *lim, int all);
void VRE_free(vre_t **);
diff --git a/lib/libvarnish/vre.c b/lib/libvarnish/vre.c
index 959201fa8..0cf5c9bfd 100644
--- a/lib/libvarnish/vre.c
+++ b/lib/libvarnish/vre.c
@@ -244,7 +244,7 @@ VRE_match(const vre_t *code, const char *subject, size_t length,
}
int
-VRE_capture(vre_t *code, const char *subject, size_t length, int options,
+VRE_capture(const vre_t *code, const char *subject, size_t length, int options,
txt *groups, size_t count, const volatile struct vre_limits *lim)
{
int i;
More information about the varnish-commit
mailing list