lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


[BUMP]
On 9/21/07, Thomas Harning Jr. <harningt@gmail.com> wrote:
> Would it be possible to override lua_tolstring/lua_tostring such that
> they could use a userdata function that returns a pointer+length into
> an 'external' buffer that could be guaranteed to be unchanged for a
> specific duration?  I'm thinking this would be particularly useful in
> making my luaevent libary's event_buffer object consumable by various
> libraries (lua's regex, lpeg, etc) w/o having to muck around w/
> creating string instances that end up getting hashed/etc even if
> parsing would end up using a small amt of the data or failing...
>
> I vaguely recall something like this being discussed in the past, but
> I can't find it.
>
> (Plug: http://luaforge.net/forum/forum.php?forum_id=1331 )


-- 
Thomas Harning Jr.