From 9c42498b639976449cbeaaee33ed89df8971b6fd Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Wed, 9 Jun 2021 13:22:19 +0200 Subject: Revert to csptr_X_reset_with() to keep API, also better name. --- docs/csptr_api.md | 2 +- include/stc/csptr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/csptr_api.md b/docs/csptr_api.md index beafa5b9..96cc34d5 100644 --- a/docs/csptr_api.md +++ b/docs/csptr_api.md @@ -40,7 +40,7 @@ csptr_X csptr_X_from(Value* p); // constructor csptr_X csptr_X_make(Value val); // make_shared; fast void csptr_X_reset(csptr_X* self); -csptr_X_value_t* csptr_X_reset_from(csptr_X* self, Value* p); // slower than reset_make(). +csptr_X_value_t* csptr_X_reset_with(csptr_X* self, Value* p); // slower than reset_make(). csptr_X_value_t* csptr_X_reset_make(csptr_X* self, Value val); // assign new sptr with value csptr_X_value_t* csptr_X_copy(csptr_X* self, CX other); // copy shared (increase use count) diff --git a/include/stc/csptr.h b/include/stc/csptr.h index 4637963e..70bd87f0 100644 --- a/include/stc/csptr.h +++ b/include/stc/csptr.h @@ -139,7 +139,7 @@ typedef long atomic_count_t; } \ \ STC_INLINE CX##_value_t* \ - CX##_reset_from(CX* self, CX##_value_t* p) { \ + CX##_reset_with(CX* self, CX##_value_t* p) { \ CX##_del(self); \ *self = CX##_from(p); \ return self->get; \ -- cgit v1.2.3