digitalmars.D.learn - wrapping a void* by a ubyte[] array?
- teo (2/2) Jul 14 2011 Is there any way of wrapping a void* by a ubyte[] array? The void* comes...
- Simen Kjaeraas (4/6) Jul 14 2011 byte[] array = cast(ubyte[])mmap(addr, length, ...)[0..length;]
- Daniel Murphy (4/6) Jul 14 2011 Cast to ubyte* and slice?
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