]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
shrink unlang_group_t slightly
authorAlan T. DeKok <aland@freeradius.org>
Fri, 15 Sep 2017 13:32:50 +0000 (09:32 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 15 Sep 2017 13:50:51 +0000 (09:50 -0400)
with anonymous struct anonymous union

src/include/interpreter.h

index 2979fc02d082062dfc981bd9db5e6f22ca5469db..96b9814f4dbd976075d9e1b940b048e19f169cfe 100644 (file)
@@ -131,16 +131,27 @@ typedef struct {
        CONF_SECTION            *cs;
        int                     num_children;
 
-       vp_tmpl_t               *vpt;           //!< #UNLANG_TYPE_SWITCH, #UNLANG_TYPE_MAP.
-
-       vp_map_t                *map;           //!< #UNLANG_TYPE_UPDATE, #UNLANG_TYPE_MAP.
+       /*
+        *      Hackity-hack.  We should probably just have a common
+        *      group header, and then have type-specific structures.
+        */
        union {
+               struct {
+                       vp_tmpl_t               *vpt;           //!< #UNLANG_TYPE_SWITCH, #UNLANG_TYPE_MAP, #UNLANG_TYPE_CALL
+
+                       union {
+                               struct {
+                                       vp_map_t                *map;           //!< #UNLANG_TYPE_UPDATE, #UNLANG_TYPE_MAP.
+                                       map_proc_inst_t         *proc_inst;     //!< Instantiation data for #UNLANG_TYPE_MAP.
+                               };
+                               struct {
+                                       void const              *process;       //!< #UNLANG_TYPE_CALL
+                                       CONF_SECTION            *server_cs;     //!< #UNLANG_TYPE_CALL
+                               };
+                       };
+               };
                fr_cond_t               *cond;          //!< #UNLANG_TYPE_IF, #UNLANG_TYPE_ELSIF.
-
-               map_proc_inst_t         *proc_inst;     //!< Instantiation data for #UNLANG_TYPE_MAP.
-               void const              *process;       //!< UNLANG_TYPE_CALL
        };
-       CONF_SECTION            *server_cs;             //!< UNLANG_TYPE_CALL
 } unlang_group_t;
 
 /** A call to a module method