]> git.ipfire.org Git - thirdparty/freeradius-server.git/commit
move keyword compile_foo() to foo.c
authorAlan T. DeKok <aland@freeradius.org>
Thu, 3 Jul 2025 17:24:30 +0000 (13:24 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 3 Jul 2025 18:25:51 +0000 (14:25 -0400)
commit97a5de64083bdd33dc61ba6d98e7c067792558c8
treed62e45a122703b06032dc3ed75862ffcf1a892e1
parent65fff2611255d0b2a84d911dfa26f34d81bdeac6
move keyword compile_foo() to foo.c

mostly. compile_edit(), compile_tmpl(), compile_module(), and
compile_function() are still in compile.c

Many helper functions are exported in interpret_priv.h.  Some of
those should be cleaned up / renamed / un-exported.

The function names could likely be cleaned up.  Much of the code
uses unlang_foo() for private functions.  It should arguably use
private function names.

The unlang_register() function takes a type as both a function
argument, and as a field in unlang_op_t.  Fixing that will require
changing instruction->type to instruction->op in the interpreter,
which should be a next step.

The hash function is just fr_hash().  We should arguably come up
with a perfect hash for the keywords, which will help simplify
the lookups.
27 files changed:
src/lib/unlang/base.c
src/lib/unlang/call.c
src/lib/unlang/caller.c
src/lib/unlang/catch.c
src/lib/unlang/child_request.c
src/lib/unlang/compile.c
src/lib/unlang/condition.c
src/lib/unlang/detach.c
src/lib/unlang/edit.c
src/lib/unlang/finally.c
src/lib/unlang/foreach.c
src/lib/unlang/function.c
src/lib/unlang/group.c
src/lib/unlang/limit.c
src/lib/unlang/load_balance.c
src/lib/unlang/map.c
src/lib/unlang/module.c
src/lib/unlang/parallel.c
src/lib/unlang/return.c
src/lib/unlang/subrequest.c
src/lib/unlang/switch.c
src/lib/unlang/timeout.c
src/lib/unlang/tmpl.c
src/lib/unlang/transaction.c
src/lib/unlang/try.c
src/lib/unlang/unlang_priv.h
src/lib/unlang/xlat.c