]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Move the xlat flag merge function into xlat_priv.h
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 1 Dec 2021 14:38:42 +0000 (08:38 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 1 Dec 2021 20:06:50 +0000 (14:06 -0600)
src/lib/unlang/xlat_priv.h
src/lib/unlang/xlat_tokenize.c

index 8927ca27fe0766d5f9334c2cb99d311c8e177edf..bd0dd408b493f2d455a97108c614e492ecbc3551 100644 (file)
@@ -153,6 +153,22 @@ typedef struct {
        size_t          len;            //!< Length of the output string.
 } xlat_out_t;
 
+/** Merge flags from child to parent
+ *
+ * For pass2, if either the parent or child is marked up for pass2, then the parent
+ * is marked up for pass2.
+ *
+ * For needs_async, if both the parent and the child are needs_async, the parent is
+ * needs_async.
+ */
+static inline void xlat_flags_merge(xlat_flags_t *parent, xlat_flags_t const *child)
+{
+       parent->needs_async |= child->needs_async;
+       parent->needs_resolving |= child->needs_resolving;
+       parent->pure &= child->pure; /* purity can only be removed, never added */
+       parent->pure &= !parent->needs_async; /* things needing async cannot be pure */
+}
+
 /** Walker callback for xlat_walk()
  *
  * @param[in] exp      being evaluated.
index e586d8aa8d729d27df2aef63ca8ca4a10ad44817..a813545ba1006da951b24efeef52b51db3c253e0 100644 (file)
@@ -211,22 +211,6 @@ static inline CC_HINT(always_inline) void xlat_exp_set_name_buffer_shallow(xlat_
        node->fmt = fmt;
 }
 
-/** Merge flags from child to parent
- *
- * For pass2, if either the parent or child is marked up for pass2, then the parent
- * is marked up for pass2.
- *
- * For needs_async, if both the parent and the child are needs_async, the parent is
- * needs_async.
- */
-static inline CC_HINT(always_inline) void xlat_flags_merge(xlat_flags_t *parent, xlat_flags_t const *child)
-{
-       parent->needs_async |= child->needs_async;
-       parent->needs_resolving |= child->needs_resolving;
-       parent->pure &= child->pure; /* purity can only be removed, never added */
-       parent->pure &= !parent->needs_async; /* things needing async cannot be pure */
-}
-
 /** Free a linked list of xlat nodes
  *
  * @param[in,out] head to free.  Will be set to NULL