News for hackers. Stuff that matters.
Re:Proposal for a full-fledged C String by alcover on Thursday July 07, 2022 @01:01PM (#32016493)
The hard values in the readme may be confusing. The real model is

  union {
      struct {
          char*   data;
          size_t  len;
          size_t  off:8*sizeof(size_t)-TAGBITS, tag:TAGBITS;
      } ptr;
  
      struct {
          char    data[sizeof(BuffetPtr)-2];
          uint8_t refcnt;
          uint8_t len:8-TAGBITS, tag:TAGBITS;
      } sso;
  }
where the tag falls into place. I tried an older version on 32 bit and it worked ok.
Re:Proposal for a full-fledged C String by iExploder on Thursday July 07, 2022 @02:15PM (#32017421)
ahhh thanks, now that makes more sense to me