[RFC PATCH 13/20] use FI_TYPED_CONSTANT for typed constants

Asbjørn Sloth Tønnesen ast at 2e8.dk
Mon Dec 30 17:56:39 CET 2019


---
 filter/config.Y | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/filter/config.Y b/filter/config.Y
index caca0d2b..a7d1dd9b 100644
--- a/filter/config.Y
+++ b/filter/config.Y
@@ -881,8 +881,11 @@ symbol_value: CF_SYM_KNOWN
   {
     switch ($1->class) {
       case SYM_CONSTANT_RANGE:
-	$$ = f_new_inst(FI_CONSTANT, *($1->val));
-	break;
+        if ($1->flags & SYM_FLAG_IS_TYPED)
+          $$ = f_new_inst(FI_TYPED_CONSTANT, $1);
+        else
+          $$ = f_new_inst(FI_CONSTANT, *($1->val));
+        break;
       case SYM_VARIABLE_RANGE:
 	$$ = f_new_inst(FI_VAR_GET, $1);
 	break;
-- 
2.24.0



More information about the Bird-users mailing list