typedef struct {
uint8_t len; /* length of the string */
uint8_t data[0]; /* flexible‑array member */
} PASCAL_STRING;
#define PASCAL_STRING(str) \
((const PASCAL_STRING *) \
&(struct { \
uint8_t _len; \
uint8_t _data[sizeof(str) - 1]; \
}){ \
._len = (uint8_t)(sizeof(str) - 1), \
._data = { str } \
})
Comment too long. Click here to view the full text.