From 50cbc73d4fef3ce91d094b80a018769eac439965 Mon Sep 17 00:00:00 2001 From: tylov Date: Wed, 12 Jul 2023 12:38:40 +0200 Subject: template.h: i_valclone and i_valfrom are considered the same when only one is defined and i_valraw is not defined (directly or via valclass/valboxed/val_str). Also applies to key. Some adjustments for benchmarking. --- misc/examples/new_list.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'misc/examples') diff --git a/misc/examples/new_list.c b/misc/examples/new_list.c index 8083c315..5ffdaca2 100644 --- a/misc/examples/new_list.c +++ b/misc/examples/new_list.c @@ -32,8 +32,9 @@ int point_cmp(const Point* a, const Point* b) { void MyStruct_drop(MyStruct* s); #define i_type MyList -#define i_valclass MyStruct // MyStruct contains "class"-types, so define as "class" -#define i_opt c_no_clone|c_no_cmp // exclude cloning and comparison support +#define i_val MyStruct +#define i_valdrop MyStruct_drop // define drop function +#define i_no_clone // must explicitely exclude or define cloning support because of drop. #include void MyStruct_drop(MyStruct* s) { -- cgit v1.2.3