Why are void[] contents marked as having pointers?

Daniel Keep daniel.keep.lists at gmail.com
Thu Jun 4 08:59:02 PDT 2009



Christopher Wright wrote:
> bearophile wrote:
>> Christopher Wright:
>>> Another good point. Or how do you index it by byte?
>>
>> How can you read & write files of 3 bytes if voids are 4 bytes long
>> chunks? :o) I don't understand. I want to read and write files
>> byte-by-byte.
>>
>> Bye,
>> bearophile
> 
> Vladimir was suggesting that void[] be the same as ubyte[] and that you
> use void*[] if you might include a pointer. So that use case would be safe.

How would you generically store the bits of this, then?

struct Gotcha { void* ptr; ubyte boo; }



More information about the Digitalmars-d mailing list