lua-users home
lua-l archive

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


Moin moin,

On Feb 19, 2014, at 17:10 , Craig Barnes wrote:

On 19 February 2014 14:57, René Rebe <rene@exactcode.de> wrote:
I do not really understand how there can be so much argument for something
as simple as this. This bug only exists because this old-fashioned C
function
does not return how much data was read. If this C function would return a
pointer to the end of the data (like the new getline(3)) we would not even
have
an discussion now. Amazing how much energy goes into preventing other
people to improve something; fix an issue.


People are just trying to discern whether or not it's worthwhile to attempt such
a thing, within the confines of standard C. If it can't be done portably in C89,
then it doesn't meet the criteria for inclusion in Lua. Knowing that a
patch won't
be accepted before, rather than after, you spend time working on it is just
consideration, not stubborness. There's nothing to stop you from implementing
it as an external module or a proof-of-concept if you still want to.

Who said it was impossible? A simple loop fixing this issue was presented by
Francisco.

See my previous email to the list for a version that does not alter the performance
(modulo the assembly optimization implementation details in the C library for
strlen vs. memchr and just a handful of new instruction, including a load, store,
conditional, subtract, decrement).

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