4 ms·
Does that maximum length need to be a magic number, or could it be an expression written in terms of `offsetof` and `sizeof`?
by endgame 15y ago
Does that maximum length need to be a magic number, or could it be an expression written in terms of `offsetof` and `sizeof`?
- ars 15y agoIt could be (and probably should be): sizeof(long) + sizeof(char *) + sizeof(long) But it's possible the DEFINE for RSTRING_EMBED_LEN_MAX is that and not a fixed number. You need the DEFINE since it would be needed elsewhere to check the length of a string before storing it.