From 8410e66eb5379cfd1cc0e162a5a96093a304979d Mon Sep 17 00:00:00 2001 From: Robear Selwans Date: Mon, 7 Jul 2025 10:45:09 +0300 Subject: [PATCH] [ev_str] Added COPY and FREE to type data Signed-off-by: Robear Selwans --- ev_str.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ev_str.h b/ev_str.h index 7d00e35..a65aba6 100644 --- a/ev_str.h +++ b/ev_str.h @@ -197,8 +197,20 @@ DEFINE_EQUAL_FUNCTION(evstring, Default) 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, - EQUAL(Default) + EQUAL(Default), + COPY(Default), + FREE(Default) );