lua-users home
lua-l archive

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


> Isn't be better to free the previously allocated buffer before calls 
> lua_error()? (realloc() doesn't free the buffer if it can't allocate 
> new memory, or not?)
> Sorry if I am wrong.

You are right. We will correct that. Thank you.


> Out of curiosity: why read_file() calls realloc() and read_chars
> ()/openwithcontrol() calls malloc() instead of the luaM_ versions?

Because they use only the official API, and the API does not export luaM_*.
Should it?

-- Roberto