lua-users home
lua-l archive

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


> > * malloc: as far as I know, a correct malloc should not change errno.
> > An error in malloc generates a MEMERR, so errno is not used.
> 
> Sadly, that's not true.

  "The value of errno is zero at program startup, but is never set to
   zero by any library function."  (ISO/IEC 9899:1999, page 186)

(So, it may change errno, but only to another error code...)


> I agree with ET: errno is an awful mechanism for error reporting.

I guess we all agree on this point. But does C have another mechanism
that we could use?

-- Roberto