STINNER Victor <victor.stin...@haypocalc.com> added the comment:

In Python 3.x, internal_close() returns -1 on error (close() returns a 
negative value) and 0 on success. It tests if close() returns a 
negative

In Python 2.x, internal_closes() returns the errno value of close() on 
error, or 0 on success. fileio_close() tests if the error value is 
negative instead of not null or at least strict positive.

Python 3.x code looks better. I tried to backport the internal_close() 
changes but I get a segfault :-p

----------
nosy: +haypo

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue4841>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to