summaryrefslogtreecommitdiffhomepage
path: root/misc/examples
diff options
context:
space:
mode:
authortylov <[email protected]>2023-07-12 12:38:40 +0200
committertylov <[email protected]>2023-07-12 13:56:06 +0200
commit50cbc73d4fef3ce91d094b80a018769eac439965 (patch)
tree79492e482cf232ed4def920c015c5f86f030f295 /misc/examples
parent0bcb0fcd981cb15329dfd4fb675097564164da18 (diff)
downloadSTC-modified-50cbc73d4fef3ce91d094b80a018769eac439965.tar.gz
STC-modified-50cbc73d4fef3ce91d094b80a018769eac439965.zip
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.
Diffstat (limited to 'misc/examples')
-rw-r--r--misc/examples/new_list.c5
1 files changed, 3 insertions, 2 deletions
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 <stc/clist.h>
void MyStruct_drop(MyStruct* s) {