[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: suggestion : method to push constant strings
- From: "paulmatthews" <paulmatthews@...>
- Date: Fri, 01 Feb 2002 08:37:29 -0000
I don't know if this has been discussed before. I seached the archive
but to no avail.
Anyway it appears that lua_pushstring() and lua_pushlstring() take a
copy of the string that is passed, which is all fine. However I need
to call into lua lots of times, i.e. 100's of millions of times with
30-40 parameters each time, and all those little malloc's and mempy's
start to add up.
Is there anyway to pass strings to lua but tell it. "Hey here's the
parameter, but don't bother copying it 'cause I don't want you to
Is it something to do with userdata tags? If so how do I tell it "its
userdata, but treat it like a string"?