Related to my question here
https://community.slickedit.com/index.php/topic,18344.msg72392.html#msg72392I have a doubly linked list handler and I use linked lists in a variety of places in my macros. This seems to mean that I have a number of "dlist" objects in my state file
e.g.
struct dlist_node {
int s_next;
int s_prev;
typeless s_data;
};
struct dlist {
int s_head;
int s_tail;
int max_nodes;
boolean overwrite_f;
dlist_node nodes[];
int free_head;
int free_count;
};
static dlist retrace_cursor_list;
static dlist retrace_modified_lines_list;
So now I want to add a new member to the dlist struct
bool modified;
If I add this member, then reload the module, will this cause my macro code to crash because the memory for the dlist objects in the state file doesn't match the new struct?
If so, how do I handle this?
I suspect slick C has a way of handling this but if it does, then why am I getting crashes??
I would have expected that if I delete the state file and all the .ex files and rebuild everything, the problem should go away - but it doesn't seem to. I'm unable to add a new data member to the dlist struct without getting crashes. Correction, this does seem to resolve it - but this is not really a solution for other people who are using my xretrace macro.