tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: constification ?



>> There are a few problems, though, notably readv/writev, which for
>> historical reasons share the same struct iovec, which because of
>> readv cannot have a const iov_base - which means writev requires a
>> const-stripper to be used in properly const-poisoned code.

>> I've been thinking about it for a while now and haven't come up with
>> any solution I like.

> A union would work, but it breaks the standards.

It changes the API, too (even if it's a transparent union), and if
you're going to do that, you might as well just have struct riovec and
struct wiovec, or some such.

/~\ The ASCII                           der Mouse
\ / Ribbon Campaign
 X  Against HTML               mouse%rodents.montreal.qc.ca@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index