[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How is string passed from Lua to C
- From: Patrick Rapin <toupie300@...>
- Date: Wed, 7 Dec 2011 16:45:22 +0100
> Right but lua_tostring returns const char* so any attempt to modify the
> string should be caught by the compiler.
Yes, but it is way too easy to cast the result into (char*), in order
to fix the compilation error...
So the programmer has to understand that it is really forbidden to
modify that string.