Reuse C memory for D struct?

Dicebot public at dicebot.lv
Mon Nov 25 09:57:19 PST 2013


On Monday, 25 November 2013 at 17:38:00 UTC, Lemonfiend wrote:
> &_this
> vs
> _this.ptr
>
> I had thought those would give the same result, but apparently 
> not?

Think about slice as a struct with two fields - data pointer and 
data length. `&slice` gives pointer to struct itself, `slice.ptr` 
yields data pointer.


More information about the Digitalmars-d-learn mailing list