# HG changeset patch # User Paul Boddie # Date 1485967362 -3600 # Node ID 05ef82f4028030763e70e37dea86bf451b845a06 # Parent 354ddce9205e192a83df44f616b7adcd3424b137 Fixed native fdopen usage and the result of the fdopen function. diff -r 354ddce9205e -r 05ef82f40280 lib/posix/io.py --- a/lib/posix/io.py Wed Feb 01 16:53:34 2017 +0100 +++ b/lib/posix/io.py Wed Feb 01 17:42:42 2017 +0100 @@ -3,7 +3,7 @@ """ POSIX input/output functions. -Copyright (C) 2016 Paul Boddie +Copyright (C) 2016, 2017 Paul Boddie This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -72,8 +72,11 @@ 'bufsize'. """ + check_int(fd) + check_string(mode) + get_using(filestream.__init__, self)(encoding, bufsize) - self.__data__ = fdopen(fd, mode) + self.__data__ = _fdopen(fd, mode) # Standard streams. @@ -111,9 +114,7 @@ 'mode'. """ - check_int(fd) - check_string(mode) - return _fdopen(fd, mode) + return sysstream(fd, mode) def fpathconf(fd, name): pass def fstat(fd): pass