summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--README.md9
-rw-r--r--include/stc/template.h6
2 files changed, 10 insertions, 5 deletions
diff --git a/README.md b/README.md
index f64eb515..49edc853 100644
--- a/README.md
+++ b/README.md
@@ -331,12 +331,11 @@ typedef struct Dataset {
#include <stc/cstack.h>
```
-User-defined container prefix
------------------------------
-Define either `i_prefix` or `i_tag` as empty:
+User-defined container type name
+--------------------------------
+Define `i_cnt` instead of `i_tag`:
```c
-#define i_prefix
-#define i_tag myvec
+#define i_cnt myvec
#define i_val int
#include <stc/cvec.h>
diff --git a/include/stc/template.h b/include/stc/template.h
index 73f87f38..f0b0a8d7 100644
--- a/include/stc/template.h
+++ b/include/stc/template.h
@@ -51,6 +51,11 @@
#define i_tag F_tag
#define i_fwd
#endif
+#ifdef i_cnt
+ #define i_tag i_cnt
+ #undef i_prefix
+ #define i_prefix
+#endif
#ifndef i_prefix_csptr
#define i_prefix_csptr csptr_
@@ -186,6 +191,7 @@
#undef i_key_csptr
#undef i_val_csptr
#undef i_prefix_csptr
+#undef i_cnt
#undef Self
#undef i_template