lua-users home
lua-l archive

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

> On our system, ptrdiff_t is unsigned long.

Your system isn't ANSI C. I would expect this breaks quite a number of programs.

"When two pointers are subtracted, both shall point to elements of the same array object, or one past the last element of the array object; the result is the difference of the subscripts of the two array elements. The size of the result is implementation-defined, and its type (a signed integer type) is ptrdiff_t defined in the <stddef.h> header."

(Not got the standard in front of me, but it's quoted from here: