Remove dead code

This commit is contained in:
Laria 2022-02-08 21:38:37 +01:00
parent db0fb2aee4
commit ad80ff8f85
4 changed files with 0 additions and 63 deletions

View file

@ -257,11 +257,6 @@ struct apfl_expr_param_predicate {
struct apfl_expr *rhs;
};
struct apfl_expr_param_list {
struct apfl_expr_param *children;
size_t len;
};
enum apfl_expr_param_type {
APFL_EXPR_PARAM_VAR,
APFL_EXPR_PARAM_CONSTANT,
@ -411,7 +406,6 @@ void apfl_expr_call_deinit(struct apfl_expr_call *);
void apfl_expr_body_unref(struct apfl_expr_body *);
void apfl_expr_const_deinit(struct apfl_expr_const *);
void apfl_expr_param_predicate_deinit(struct apfl_expr_param_predicate *);
void apfl_expr_param_list_deinit(struct apfl_expr_param_list *);
void apfl_expr_params_deinit(struct apfl_expr_params *);
void apfl_expr_params_item_deinit(struct apfl_expr_params_item *);
void apfl_expr_param_deinit(struct apfl_expr_param *);
@ -441,7 +435,6 @@ struct apfl_expr_call apfl_expr_call_move(struct apfl_expr_c
struct apfl_expr_body * apfl_expr_body_move(struct apfl_expr_body **);
struct apfl_expr_const apfl_expr_const_move(struct apfl_expr_const *);
struct apfl_expr_param_predicate apfl_expr_param_predicate_move(struct apfl_expr_param_predicate *);
struct apfl_expr_param_list apfl_expr_param_list_move(struct apfl_expr_param_list *);
struct apfl_expr_params apfl_expr_params_move(struct apfl_expr_params *);
struct apfl_expr_param apfl_expr_param_move(struct apfl_expr_param *);
struct apfl_expr_subfunc apfl_expr_subfunc_move(struct apfl_expr_subfunc *);

View file

@ -118,12 +118,6 @@ apfl_expr_param_predicate_deinit(struct apfl_expr_param_predicate *pred)
DEINIT_GENERIC_LHS_RHS_EXPR(pred, apfl_expr_param_deinit);
}
void
apfl_expr_param_list_deinit(struct apfl_expr_param_list *list)
{
DEINIT_LIST(list->children, list->len, apfl_expr_param_deinit);
}
void
apfl_expr_params_deinit(struct apfl_expr_params *params)
{
@ -402,14 +396,6 @@ apfl_expr_param_predicate_move(struct apfl_expr_param_predicate *in)
return out;
}
struct apfl_expr_param_list
apfl_expr_param_list_move(struct apfl_expr_param_list *in)
{
struct apfl_expr_param_list out;
MOVE_LIST(out, in, children, len);
return out;
}
struct apfl_expr_params
apfl_expr_params_move(struct apfl_expr_params *in)
{

View file

@ -327,47 +327,6 @@ apfl_editable_list_new(void)
return elist;
}
apfl_editable_list
apfl_editable_list_new_from_list(apfl_list list)
{
if (list == NULL) {
return NULL;
}
apfl_editable_list elist = ALLOC(struct apfl_editable_list_data);
if (elist == NULL) {
apfl_list_unref(list);
return NULL;
}
if (list->refcount == 1) {
// We're the only one with a reference to the list, so we can directly use the items of the list!
elist->items = list->items;
elist->len = list->len;
elist->cap = list->len;
} else {
// We first need to create a shallow copy of the elements
if (list->len != 0) {
if ((elist->items = ALLOC_LIST(struct apfl_value, list->len)) == NULL) {
apfl_list_unref(list);
free(elist);
return NULL;
}
}
for (size_t i = 0; i < list->len; i++) {
elist->items[i] = apfl_value_incref(list->items[i]);
}
elist->len = list->len;
elist->cap = list->len;
}
apfl_list_unref(list);
return elist;
}
static bool
editable_list_append_values(apfl_editable_list elist, struct apfl_value *values, size_t len)
{

View file

@ -66,7 +66,6 @@ struct apfl_editable_list_data;
typedef struct apfl_editable_list_data *apfl_editable_list;
apfl_editable_list apfl_editable_list_new(void);
apfl_editable_list apfl_editable_list_new_from_list(apfl_list);
bool apfl_editable_list_append(apfl_editable_list, struct apfl_value);
bool apfl_editable_list_append_list(apfl_editable_list, apfl_list);
void apfl_editable_list_destroy(apfl_editable_list);