Thread overview
wrapping a void* by a ubyte[] array?
Jul 14, 2011
teo
Jul 14, 2011
Simen Kjaeraas
Jul 14, 2011
Daniel Murphy
July 14, 2011
Is there any way of wrapping a void* by a ubyte[] array? The void* comes from mmap.
July 14, 2011
On Thu, 14 Jul 2011 17:07:20 +0200, teo <teo.ubuntu@yahoo.com> wrote:

> Is there any way of wrapping a void* by a ubyte[] array? The void* comes
> from mmap.

byte[] array = cast(ubyte[])mmap(addr, length, ...)[0..length;]

-- 
  Simen
July 14, 2011
Cast to ubyte* and slice?

ubyte[] array = (cast(ubyte*)pointer)[0..length];

"teo" <teo.ubuntu@yahoo.com> wrote in message news:ivn0n8$14ig$1@digitalmars.com...
> Is there any way of wrapping a void* by a ubyte[] array? The void* comes from mmap.