diff options
| author | Tyge Løvset <[email protected]> | 2021-09-21 20:49:22 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-09-21 20:49:22 +0200 |
| commit | fbfb57d46e4d042c2c5ae1c5a56dad00660d3e3b (patch) | |
| tree | 31dea2b7af4298d211b99e50b903be5f39ddebfb /include/stc/cbits.h | |
| parent | 32a3454eb463f86d7ace7b29c2e1574530499afc (diff) | |
| download | STC-modified-fbfb57d46e4d042c2c5ae1c5a56dad00660d3e3b.tar.gz STC-modified-fbfb57d46e4d042c2c5ae1c5a56dad00660d3e3b.zip | |
Added copy(self, other) function to all containers. Fixed some docs.
Diffstat (limited to 'include/stc/cbits.h')
| -rw-r--r-- | include/stc/cbits.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/stc/cbits.h b/include/stc/cbits.h index 9bf28d44..2843f7d0 100644 --- a/include/stc/cbits.h +++ b/include/stc/cbits.h @@ -67,7 +67,7 @@ STC_API cbits cbits_from_str(const char* str); STC_API char* cbits_to_str(cbits set, char* str, size_t start, intptr_t stop);
STC_API cbits cbits_clone(cbits other);
STC_API void cbits_resize(cbits* self, size_t size, bool value);
-STC_API cbits* cbits_assign(cbits* self, cbits other);
+STC_API cbits* cbits_copy(cbits* self, cbits other);
STC_API size_t cbits_count(cbits set);
STC_API bool cbits_subset_of(cbits set, cbits other);
STC_API bool cbits_disjoint(cbits set, cbits other);
@@ -160,7 +160,7 @@ STC_INLINE void cbits_xor(cbits *self, cbits other) { #if !defined(STC_HEADER) || defined(STC_IMPLEMENTATION)
-STC_DEF cbits* cbits_assign(cbits* self, cbits other) {
+STC_DEF cbits* cbits_copy(cbits* self, cbits other) {
if (self->data64 == other.data64) return self;
if (self->size != other.size) return cbits_take(self, cbits_clone(other));
memcpy(self->data64, other.data64, ((other.size + 63) >> 6)*8);
|
