Not working

FossilOrigin-Name: 73555ad5806080ecc98daade01858676f5d234a13712640a7f3267010b4bd1a9
This commit is contained in:
7u83@mail.ru
2018-03-09 20:27:46 +00:00
parent df6ce963ee
commit e4d65ef470
6 changed files with 31 additions and 18 deletions

View File

@ -1,12 +1,13 @@
#include "mavl.h"
union mavldata *mavl_replace(struct mavl *t,union mavldata *data){
union mavldata *mavl_replace(struct mavl *t,void *data){
struct mavlnode * node = mavl_get_node(t,data);
if (node){
if (t->del)
t->del(&node->data);
node->data=*data;
return &node->data;
t->del(node+sizeof(struct mavlnode));
/* node->data=*data;
*/ mavlnode_copy_data(node+sizeof(struct mavlnode), data);
return &node->data;
}
return mavl_add(t,data);
}