[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Defining a library for mutable byte arrays
- From: Henk Boom <henk@...>
- Date: Sat, 4 Jun 2011 17:26:37 -0400
On 2 June 2011 10:56, Florian Weimer <fw@deneb.enyo.de> wrote:
> I'm interested in defining a lightweight library for mutable byte
> arrays. I'm attaching a draft.
Have you taken a look at memarray?
https://github.com/LuaDist/luaglut/blob/master/memarray.c
It's a little more complex because it handles different types of
numeric arrays as well (including endianness issues through tonetstr,
fromnetstr.
Just one other note, in
-- src byte array, dst string, spos, dpos, len integers
bytes.copy(dst, dpos, src, spos, len)
You probably meant to switch src and dst in the comment line.
henk