[RFC PATCH 02/20] make symbol types maskable

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


---
 conf/conf.h | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/conf/conf.h b/conf/conf.h
index 21dc3fa1..6029fee2 100644
--- a/conf/conf.h
+++ b/conf/conf.h
@@ -138,18 +138,20 @@ struct sym_scope {
 
 /* Remember to update cf_symbol_class_name() */
 #define SYM_VOID 0
-#define SYM_PROTO 1
-#define SYM_TEMPLATE 2
-#define SYM_FUNCTION 3
-#define SYM_FILTER 4
-#define SYM_TABLE 5
-#define SYM_ATTRIBUTE 6
+#define SYM_PROTO 0x1
+#define SYM_TEMPLATE 0x2
+#define SYM_FUNCTION 0x4
+#define SYM_FILTER 0x8
+#define SYM_TABLE 0x10
+#define SYM_ATTRIBUTE 0x20
 
 #define SYM_VARIABLE 0x100	/* 0x100-0x1ff are variable types */
 #define SYM_VARIABLE_RANGE SYM_VARIABLE ... (SYM_VARIABLE | 0xff)
 #define SYM_CONSTANT 0x200	/* 0x200-0x2ff are variable types */
 #define SYM_CONSTANT_RANGE SYM_CONSTANT ... (SYM_CONSTANT | 0xff)
 
+#define SYM_TYPEABLE (SYM_CONSTANT | SYM_FUNCTION | SYM_FILTER)
+
 #define SYM_TYPE(s) ((s)->val->type)
 #define SYM_VAL(s) ((s)->val->val)
 
-- 
2.24.0



More information about the Bird-users mailing list