*/
void substitution_append_var(rb_dlink_list *varlist, const char *name, const char *value)
{
- struct substitution_variable *tmp = MyMalloc(sizeof(struct substitution_variable));
+ struct substitution_variable *tmp = rb_malloc(sizeof(struct substitution_variable));
- DupString(tmp->name, name);
- DupString(tmp->value, value);
+ tmp->name = rb_strdup(name);
+ tmp->value = rb_strdup(value);
rb_dlinkAddAlloc(tmp, varlist);
}
struct substitution_variable *tmp = (struct substitution_variable *) nptr->data;
rb_dlinkDelete(nptr, varlist);
- MyFree(tmp->name);
- MyFree(tmp->value);
- MyFree(tmp);
+ rb_free(tmp->name);
+ rb_free(tmp->value);
+ rb_free(tmp);
}
}