mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-03 08:20:28 +00:00
Refer to union members in initializers
These two functions are the primitive pseudo-constructors for the struct fields in the union; as such, it does not make sense for them to use the checked accessors.
This commit is contained in:
parent
cc2e97ed20
commit
6eabf197e2
1 changed files with 4 additions and 4 deletions
|
@ -332,16 +332,16 @@ class string
|
|||
{
|
||||
if (size > __::sso_max)
|
||||
__builtin_trap();
|
||||
*(blob + __::sso_max) = (__::sso_max - size);
|
||||
__s.rem = __::sso_max - size;
|
||||
}
|
||||
|
||||
void set_big_string(char* const p, const size_t n, const size_t c2) noexcept
|
||||
{
|
||||
if (c2 > __::big_mask)
|
||||
__builtin_trap();
|
||||
*(char**)blob = p;
|
||||
*(((size_t*)blob) + 1) = n;
|
||||
*(((size_t*)blob) + 2) = c2 | ~__::big_mask;
|
||||
__b.p = p;
|
||||
__b.n = n;
|
||||
__b.c = c2 | ~__::big_mask;
|
||||
}
|
||||
|
||||
__::small_string* small() noexcept
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue