static size_t unlang_frame_action_table_len = NUM_ELEMENTS(unlang_frame_action_table);
#ifndef NDEBUG
-static void instruction_dump(REQUEST *request, unlang_t *instruction)
+static void instruction_dump(REQUEST *request, unlang_t const *instruction)
{
RINDENT();
if (!instruction) {
static inline void frame_state_init(unlang_stack_t *stack, unlang_stack_frame_t *frame)
{
- unlang_t *instruction = frame->instruction;
+ unlang_t const *instruction = frame->instruction;
unlang_op_t *op;
op = &unlang_ops[instruction->type];
static inline unlang_frame_action_t result_calculate(REQUEST *request, unlang_stack_frame_t *frame,
rlm_rcode_t *result, int *priority)
{
- unlang_t *instruction = frame->instruction;
+ unlang_t const *instruction = frame->instruction;
unlang_stack_t *stack = request->stack;
RDEBUG4("** [%i] %s - have (%s %d) module returned (%s %d)",
* Loop over all the instructions in this list.
*/
while (frame->instruction) {
- unlang_t *instruction = frame->instruction;
+ unlang_t const *instruction = frame->instruction;
unlang_action_t action = UNLANG_ACTION_UNWIND;
DUMP_STACK;
unlang_stack_t *stack = request->stack;
int depth = stack->depth;
unlang_stack_frame_t *frame;
- unlang_t *instruction;
+ unlang_t const *instruction;
fr_skip_whitespace(fmt);
* Line number of the current section.
*/
if (strcmp(fmt, "line") == 0) {
- unlang_group_t *g;
+ unlang_group_t const *g;
if (!unlang_ops[instruction->type].debug_braces) {
return snprintf(*out, outlen, "???");
}
- g = unlang_generic_to_group(instruction);
+ g = (unlang_group_t const *) instruction;
rad_assert(g->cs != NULL);
return snprintf(*out, outlen, "%d", cf_lineno(g->cs));
* Filename of the current section.
*/
if (strcmp(fmt, "filename") == 0) {
- unlang_group_t *g;
+ unlang_group_t const *g;
if (!unlang_ops[instruction->type].debug_braces) {
return snprintf(*out, outlen, "???");
}
- g = unlang_generic_to_group(instruction);
+ g = (unlang_group_t const *) instruction;
rad_assert(g->cs != NULL);
return snprintf(*out, outlen, "%s", cf_filename(g->cs));