Base, utility functions for the unlang library.
- Id
- fc841c11f4fbd9733ee4b58675dd33431bc2560d
- Copyright
- 2019 The FreeRADIUS server project
Definition in file base.c.
Register an operation with the interpreter.
The main purpose of this registration API is to avoid intermixing the xlat, condition, map APIs with the interpreter, i.e. the callbacks needed for that functionality can be in their own source files, and we don't need to include supporting types and function declarations in the interpreter.
Later, this could potentially be used to register custom operations for modules.
The reason why there's a function instead of accessing the unlang_op array directly, is because 'type' really needs to go away, as needing to add ops to the unlang_type_t enum breaks the pluggable module model. If there's no explicit/consistent type values we need to enumerate the operations ourselves.
- Parameters
-
[in] | type | Operation identifier. Used to map compiled unlang code to operations. |
[in] | op | unlang_op to register. |
Definition at line 63 of file base.c.