interesting idea, I had a few questions when looking at it
- afaik size_t and char* types are implementation dependent, not sure if this could cause problems, maybe you already thought about the implications?
- are you hard set on using GPL?
- afaik size_t and char* types are implementation dependent, not sure if this could cause problems, maybe you already thought about the implications?
- are you hard set on using GPL?
GPL : Not really. Maybe LGPL would do. I want the lib to promote open source and that's it.
I mean on 32 bit platform the offset to union tag would be different depending on the struct the union holds, unless I'm missing something
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.