Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(root->type == root->children[i]->type){
- int numberOfChildren = root->n_children + root->children[i]->n_children;
- root->children = realloc(root->children, sizeof(node_t)*(numberOfChildren));
- if(root->children != NULL) {
- for(int j = 0; j < root->children[i]->n_children; j++)
- {
- root->children[root->n_children-1+j] = root->children[i]->children[j];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement