Is luaL_buffer limited by memory only?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is luaL_buffer limited by memory only?

Andreas Falkenhahn-2
Is a luaL_buffer limited by available memory only or are there other limits? i.e. can I use luaL_addlstring() to stuff lots (several megabytes) of data into a luaL_buffer and then push it as a string on the stack using luaL_pushresult()?

Note that I'm still on Lua 5.0.

--
Best regards,
 Andreas Falkenhahn                          mailto:[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Is luaL_buffer limited by memory only?

Roberto Ierusalimschy
> Is a luaL_buffer limited by available memory only or are there other limits? i.e. can I use luaL_addlstring() to stuff lots (several megabytes) of data into a luaL_buffer and then push it as a string on the stack using luaL_pushresult()?

Memory and size_t. I don't remember all details about 5.0, maybe INTMAX
is a limit, too. Otherwise, there should be no problems.

-- Roberto