Skip to content
Permalink
Browse files

s/frame_inst/frame_state/g

  • Loading branch information
arr2036 committed Sep 26, 2019
1 parent cd9b89c commit d80587c87ff1292f40994fe6d6965305a44ffb62
Showing with 14 additions and 13 deletions.
  1. +2 −2 src/lib/unlang/function.c
  2. +3 −3 src/lib/unlang/interpret.c
  3. +3 −2 src/lib/unlang/interpret.h
  4. +4 −4 src/lib/unlang/load_balance.c
  5. +2 −2 src/lib/unlang/map.c
@@ -130,8 +130,8 @@ void unlang_function_init(void)
.name = "function",
.func = unlang_function_call,
.debug_braces = false,
.frame_inst_size = sizeof(unlang_frame_state_func_t),
.frame_inst_name = "unlang_frame_state_func_t",
.frame_state_size = sizeof(unlang_frame_state_func_t),
.frame_state_name = "unlang_frame_state_func_t",
});

}
@@ -228,9 +228,9 @@ static inline void frame_setup(unlang_stack_t *stack, unlang_stack_frame_t *fram
/*
* The frame needs to track state. Do so here.
*/
if (op->frame_inst_size) {
MEM(frame->state = talloc_zero_array(stack, uint8_t, op->frame_inst_size));
talloc_set_name_const(frame->state, op->frame_inst_name);
if (op->frame_state_size) {
MEM(frame->state = talloc_zero_array(stack, uint8_t, op->frame_state_size));
talloc_set_name_const(frame->state, op->frame_state_name);
}
}

@@ -93,8 +93,9 @@ typedef struct {
bool debug_braces; //!< Whether the operation needs to print braces
///< in debug mode.

size_t frame_inst_size; //!< size of instance data in the stack frame
char const *frame_inst_name; //!< talloc name of the frame instance data
size_t frame_state_size; //!< size of instance data in the stack frame

char const *frame_state_name; //!< talloc name of the frame instance data
} unlang_op_t;

void unlang_interpret_push_function(REQUEST *request,
@@ -292,16 +292,16 @@ void unlang_load_balance_init(void)
.name = "load-balance group",
.func = unlang_load_balance,
.debug_braces = true,
.frame_inst_size = sizeof(unlang_frame_state_redundant_t),
.frame_inst_name = "unlang_frame_state_redundant_t",
.frame_state_size = sizeof(unlang_frame_state_redundant_t),
.frame_state_name = "unlang_frame_state_redundant_t",
});

unlang_register(UNLANG_TYPE_REDUNDANT_LOAD_BALANCE,
&(unlang_op_t){
.name = "redundant-load-balance group",
.func = unlang_redundant_load_balance,
.debug_braces = true,
.frame_inst_size = sizeof(unlang_frame_state_redundant_t),
.frame_inst_name = "unlang_frame_state_redundant_t",
.frame_state_size = sizeof(unlang_frame_state_redundant_t),
.frame_state_name = "unlang_frame_state_redundant_t",
});
}
@@ -370,7 +370,7 @@ void unlang_map_init(void)
&(unlang_op_t){
.name = "map",
.func = unlang_map_state_init,
.frame_inst_size = sizeof(unlang_frame_state_map_proc_t),
.frame_inst_name = "unlang_frame_state_map_proc_t",
.frame_state_size = sizeof(unlang_frame_state_map_proc_t),
.frame_state_name = "unlang_frame_state_map_proc_t",
});
}

0 comments on commit d80587c

Please sign in to comment.
You can’t perform that action at this time.