[ev_str] Added COPY and FREE to type data
Signed-off-by: Robear Selwans <robear.selwans@outlook.com>
This commit is contained in:
14
ev_str.h
14
ev_str.h
@@ -197,8 +197,20 @@ DEFINE_EQUAL_FUNCTION(evstring, Default)
|
|||||||
return evstring_cmp(*(evstring*)self, *(evstring*)other) == 0;
|
return evstring_cmp(*(evstring*)self, *(evstring*)other) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFINE_COPY_FUNCTION(evstring, Default)
|
||||||
|
{
|
||||||
|
*(evstring*)dst = evstring_newFromStr(*src);
|
||||||
|
}
|
||||||
|
|
||||||
|
DEFINE_FREE_FUNCTION(evstring, Default)
|
||||||
|
{
|
||||||
|
evstring_free(*self);
|
||||||
|
}
|
||||||
|
|
||||||
TYPEDATA_GEN(evstring,
|
TYPEDATA_GEN(evstring,
|
||||||
EQUAL(Default)
|
EQUAL(Default),
|
||||||
|
COPY(Default),
|
||||||
|
FREE(Default)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user