--- Comment #5 from Steven Schveighoffer <> 2010-05-10 
04:28:16 PDT ---
Look at this part of the code, which actually writes the void[]:

auto r = _d_newarrayT(ti, dim); // r is of type ulong
p = *cast(void[]*)(&r);

This is inside the foo inner function (comment added by me).

Care must be taken not to set the individual parts of the array because you can
trigger runtime calls.

I'm not saying that this means casting to/from ulong is the best solution, I'm
just trying to explain why an actual D array may not be the most suitable type
to use internally.

I'm unsure why the foo function uses arrays internally, it clearly takes great
pains not to trigger any runtime calls by using casting and the ptr member.  I
don't see why it can't do this with the Array struct type instead.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to