On 5/3/19 5:42 AM, Ali Çehreli wrote:
On 05/02/2019 08:21 PM, James Blachly wrote:
On 5/2/19 4:05 PM, ag0aep6g wrote:
Just slice the pointer with the length:
int* ptr;
size_t len;
int[] arr = ptr[0 .. len];
Perfect thanks. I searched but without using the magic word "slice" I
On 05/02/2019 08:21 PM, James Blachly wrote:
On 5/2/19 4:05 PM, ag0aep6g wrote:
Just slice the pointer with the length:
int* ptr;
size_t len;
int[] arr = ptr[0 .. len];
Perfect thanks. I searched but without using the magic word "slice" I
couldn't find meaningful results.
Th
On 5/2/19 4:05 PM, ag0aep6g wrote:
Just slice the pointer with the length:
int* ptr;
size_t len;
int[] arr = ptr[0 .. len];
Perfect thanks. I searched but without using the magic word "slice" I
couldn't find meaningful results.
Thanks again.
On 02.05.19 22:03, James Blachly wrote:
I work a lot with C functions, many of which yield pointer + length.
Is there a way to cast this or materialize a D-style array backed by the
already allocated data (with length) to avoid copies which slow things
down?
Just slice the pointer with the l
I work a lot with C functions, many of which yield pointer + length.
Is there a way to cast this or materialize a D-style array backed by the
already allocated data (with length) to avoid copies which slow things down?
I recognize memory management is a complication. Typically, I would be
res