lua-users home
lua-l archive

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


On Feb 21, 2014, at 9:48 , Dirk Laurie wrote:

2014-02-17 17:51 GMT+02:00 René Rebe <rene@exactcode.de>:
May I suggest replacing the call to fgets in src/liolib.c so that we can
read lines with \0 data?

After 95 messages, 26 of them by the OP mainly pooh-poohing all
attempts to disagree, let's take stock.

The text stream comments about disallowing \0 where not backed by standard text. And the last example in hex showing it would not work in some cases was also not correct.

1. Anybody besides the OP thinking that this should be done?
2. Anybody, even the OP, thinking that the Lua developers
will do this?

My patch to make string matching more \0 aware where accepted for Lua 5.2 some year or two ago.

Why artificially leave one function defect when it can be fixed with a few lines change? Why not to copy everything the C function returned into the Lua result?

Sorry for intending to contribute to make Lua better, I will nowfocus on my other work on my desk. My local Lua copy has this fix, I could care less if this is addressed in upstream, vanilla Lua now.

Cheers,
René

-- 
 ExactCODE GmbH, Jaegerstr. 67, DE-10117 Berlin
 http://exactcode.com | http://exactscan.com | http://ocrkit.com | http://t2-project.org | http://rene.rebe.de