mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-21 00:47:28 +01:00
Add an array.copy_from method.
This commit is contained in:
1 parent
569e800bac
commit
ed8a91ef51
10 files changed
+116
-43
No files matched your search
@@ -347,6 +347,13 @@ static inline puffs_base_slice_u8 puffs_base_slice_u8_suffix(
|
||||
return s;
|
||||
}
|
||||
|
||||
// puffs_base_slice_u8_copy_from calls memmove(dst.ptr, src.ptr, n) where n is
|
||||
// the minimum of dst.len and src.len.
|
||||
static inline void puffs_base_slice_u8_copy_from(puffs_base_slice_u8 dst,
|
||||
puffs_base_slice_u8 src) {
|
||||
memmove(dst.ptr, src.ptr, dst.len < src.len ? dst.len : src.len);
|
||||
}
|
||||
|
||||
#endif // PUFFS_BASE_IMPL_H
|
||||
|
||||
// ---------------- Status Codes Implementations
|
||||
|
||||
Reference in new issue
Block a user