From d9fa3685127ee1166491458e3d7e3fe1b50bdf31 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Fri, 25 Sep 2020 21:16:22 +0200 Subject: Simplified. --- stc/cptr.h | 12 ------------ stc/csptr.h | 15 --------------- 2 files changed, 27 deletions(-) diff --git a/stc/cptr.h b/stc/cptr.h index 93ba47ca..f8edb0d4 100644 --- a/stc/cptr.h +++ b/stc/cptr.h @@ -87,17 +87,5 @@ int main() { } \ typedef int cptr_##X##_dud4 -#define using_cptr_5(X, Value, valueDestroy, valueCompare, hash) \ - using_cptr_4(X, Value, valueDestroy, valueCompare); \ - STC_INLINE int \ - cptr_##X##_equals(cptr_##X* x, cptr_##X* y) { \ - return valueCompare(*x, *y) == 0; \ - } \ - STC_INLINE uint32_t \ - cptr_##X##_hash(cptr_##X* self, size_t len) { \ - return hash(*self, len); \ - } \ - typedef int cptr_##X##_dud5 - #endif \ No newline at end of file diff --git a/stc/csptr.h b/stc/csptr.h index 42b8535a..5089ca36 100644 --- a/stc/csptr.h +++ b/stc/csptr.h @@ -116,9 +116,6 @@ typedef long atomic_count_t; csptr_##X##_del(self); \ *self = csptr_##X##_make(p); \ } \ -\ - STC_INLINE csptr_##X##_value_t* \ - csptr_##X##_get(csptr_##X x) {return x.get;} \ \ typedef csptr_##X csptr_##X##_t @@ -131,16 +128,4 @@ typedef long atomic_count_t; } \ typedef int csptr_##X##_dud4 -#define using_csptr_5(X, Value, valueDestroy, valueCompare, hash) \ - using_csptr_4(X, Value, valueDestroy, valueCompare); \ - STC_INLINE int \ - csptr_##X##_equals(csptr_##X* x, csptr_##X* y) { \ - return valueCompare(x->get, y->get) == 0; \ - } \ - STC_INLINE uint32_t \ - csptr_##X##_hash(csptr_##X* self, size_t len) { \ - return hash(&self->get, len); \ - } \ - typedef int csptr_##X##_dud5 - #endif -- cgit v1.2.3