Not working
FossilOrigin-Name: 73555ad5806080ecc98daade01858676f5d234a13712640a7f3267010b4bd1a9
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user