diff options
| author | Tyge Løvset <[email protected]> | 2022-06-01 15:22:24 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-06-01 15:22:24 +0200 |
| commit | 444088e81d590946c80909386dfcd6b926362949 (patch) | |
| tree | 1c374787856234e400a86ed3ba00422554f08841 /examples | |
| parent | 5e4d94a2dda15733c89e7b3f52aa480cb2a341bd (diff) | |
| download | STC-modified-444088e81d590946c80909386dfcd6b926362949.tar.gz STC-modified-444088e81d590946c80909386dfcd6b926362949.zip | |
Added src/libstc.c which implements all non-templated functions (e.g. from cstr, csview, cbits, crandom), but also clist.h mergesort.
- Linking with this object file eliminates the need to define i_implement in one file for these types (or i_extern for non-templated functions in templated container, currently only clist.h)
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/list.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/list.c b/examples/list.c index a0dbd49f..7d6d1a50 100644 --- a/examples/list.c +++ b/examples/list.c @@ -1,11 +1,13 @@ #include <stdio.h>
#include <time.h>
-#define i_implement
-#include <stc/crandom.h>
+
+#define STC_IMPLEMENT
+#define STC_EXTERN
#define i_val double
#define i_tag fx
#include <stc/clist.h>
+#include <stc/crandom.h>
int main() {
int k;
|
