diff options
| author | Tyge Løvset <[email protected]> | 2021-06-09 13:22:19 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-06-09 13:22:19 +0200 |
| commit | 9c42498b639976449cbeaaee33ed89df8971b6fd (patch) | |
| tree | c50ef6ef2c8b3bfa53680aeecc936c5d8bfc423b | |
| parent | 5f16859df941c790e61c00a99fc62985601ca16b (diff) | |
| download | STC-modified-9c42498b639976449cbeaaee33ed89df8971b6fd.tar.gz STC-modified-9c42498b639976449cbeaaee33ed89df8971b6fd.zip | |
Revert to csptr_X_reset_with() to keep API, also better name.
| -rw-r--r-- | docs/csptr_api.md | 2 | ||||
| -rw-r--r-- | 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; \
|
