checkedc
checkedc copied to clipboard
Document itypes on typedef struct S* HANDLE to reduce confusion
The result of putting a bounds-safe interface on the following code:
typedef struct foo
{ //...
HANDLE h; // HANDLE is defined as typedef struct S* HANDLE
//...
}
is a little bit unintuitive and less readable than most interface additions:
typedef struct foo
{ //...
HANDLE h : itype(ptr<struct S>);
//...
}
We should add an example of this to the documentation on bounds-safe interfaces, since typedef struct FOO* BAR is a very common C idiom.