[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: embedding zeroes
- From: Patrick Rapin <toupie300@...>
- Date: Tue, 20 Dec 2011 11:54:48 +0100
> Lua 5.2 manual explicitly describes it:
> `Any kind of end-of-line sequence (carriage return, newline, carriage
> return followed by newline, or newline followed by carriage return) is
> converted to a simple newline.`
Sorry, yes, you are right. I didn't realize that.
Maybe because Lua 5.1 manual does not explain this conversion.
But now I have a question. Since Lua converts any type of newlines
into "\n" (in inclinenumber function), why does luaL_loadfilex opens
the script file in text mode ?
This adds complexity in the function since it has to reopen the file
in binary mode when the file is precompiled.
And there is (probably) a performance penalty since the new line
conversion is performed twice.