summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-11-24 22:56:09 +0100
committerTyge Løvset <[email protected]>2021-11-24 22:56:09 +0100
commit9da78656f7b4a756dad2bf1c285a61a5186fd5ae (patch)
treed40af7ad57aa5d2468f45028937d0b7aaefd2080 /examples
parentb24cf706b9bbaff0eb97d9663e43a1e5e065ab83 (diff)
downloadSTC-modified-9da78656f7b4a756dad2bf1c285a61a5186fd5ae.tar.gz
STC-modified-9da78656f7b4a756dad2bf1c285a61a5186fd5ae.zip
Deprecated c_no_compare(). Define i_cmp_none instead when you have/want no element comparison for cvec, cdeq, clist, csptr. Will give compile time error if functions depending on comparisons are used.
Diffstat (limited to 'examples')
-rw-r--r--examples/complex.c2
-rw-r--r--examples/new_sptr.c1
-rw-r--r--examples/sptr_ex.c1
-rw-r--r--examples/sptr_pthread.c1
4 files changed, 1 insertions, 4 deletions
diff --git a/examples/complex.c b/examples/complex.c
index 32dd82eb..64c1903e 100644
--- a/examples/complex.c
+++ b/examples/complex.c
@@ -8,7 +8,7 @@ void check_del(float* v) {printf("destroy %g\n", *v);}
#include <stc/cstack.h>
#define i_val cstack_f
-#define i_cmp c_no_compare
+#define i_cmp_none
#define i_valdel cstack_f_del
#define i_tag arr
#include <stc/clist.h>
diff --git a/examples/new_sptr.c b/examples/new_sptr.c
index 77e663b7..036ce581 100644
--- a/examples/new_sptr.c
+++ b/examples/new_sptr.c
@@ -12,7 +12,6 @@ void Person_del(Person* p) {
#define i_val Person
#define i_del Person_del
-#define i_cmp c_no_compare
#define i_tag person
#include <stc/csptr.h>
diff --git a/examples/sptr_ex.c b/examples/sptr_ex.c
index 8c803db5..702edef9 100644
--- a/examples/sptr_ex.c
+++ b/examples/sptr_ex.c
@@ -18,7 +18,6 @@ void Song_del(Song* s) {
}
#define i_val Song
-#define i_cmp c_no_compare
#define i_del Song_del
#define i_tag song
#include <stc/csptr.h> // define csptr_song
diff --git a/examples/sptr_pthread.c b/examples/sptr_pthread.c
index 444d0afe..63b9a7a4 100644
--- a/examples/sptr_pthread.c
+++ b/examples/sptr_pthread.c
@@ -14,7 +14,6 @@ struct Base
void Base_del(Base* b) { printf("Base::~Base()\n"); }
#define i_val Base
-#define i_cmp c_no_compare
#define i_del Base_del
#define i_tag base
#include <stc/csptr.h>