digitalmars.D.learn - wrapping a void* by a ubyte[] array?
- teo <teo.ubuntu yahoo.com> Jul 14 2011
- "Simen Kjaeraas" <simen.kjaras gmail.com> Jul 14 2011
- "Daniel Murphy" <yebblies nospamgmail.com> Jul 14 2011
Is there any way of wrapping a void* by a ubyte[] array? The void* comes from mmap.
Jul 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
Jul 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.
Jul 14 2011









"Simen Kjaeraas" <simen.kjaras gmail.com> 