1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
From cd86dd470af5eb32518832997a40d7d486f94a2e Mon Sep 17 00:00:00 2001
From: Thibaut Artis <artous@uplex.de>
Date: Wed, 30 Jul 2025 16:54:05 +0200
Subject: build: Prevent use of bool as variable name in VGC
diff --git a/src/vmod_selector.c b/src/vmod_selector.c
index 3da9505..70f465c 100644
--- a/src/vmod_selector.c
+++ b/src/vmod_selector.c
@@ -499,7 +499,7 @@ vmod_set_add(VRT_CTX, struct vmod_selector_set *set,
re = args->regex;
if (!args->valid_string && re == NULL && !args->valid_backend
- && !args->valid_integer && !args->valid_bool && !args->valid_sub)
+ && !args->valid_integer && !args->valid_boolean && !args->valid_sub)
return;
set->table = realloc(set->table, n * sizeof(struct entry *));
@@ -523,8 +523,8 @@ vmod_set_add(VRT_CTX, struct vmod_selector_set *set,
entry->integer = args->integer;
set_added(set, n - 1, INTEGER);
}
- if (args->valid_bool) {
- entry->bool = args->bool;
+ if (args->valid_boolean) {
+ entry->bool = args->boolean;
set_added(set, n - 1, BOOLEAN);
}
if (args->valid_sub) {
diff --git a/src/vmod_selector.vcc b/src/vmod_selector.vcc
index 2debc61..456f191 100644
--- a/src/vmod_selector.vcc
+++ b/src/vmod_selector.vcc
@@ -449,7 +449,7 @@ Examples::
}
$Method VOID .add(STRING, [STRING string], [REGEX regex], [BACKEND backend],
- [INT integer], [BOOL bool], [SUB sub])
+ [INT integer], [BOOL bool:boolean], [SUB sub])
Add the given string to the set. As indicated above, elements added to
the set are implicitly numbered in the order in which they are added
|