Lichen

Change of lib/posix/io.py

356:8327049267bf
lib/posix/io.py
     1.1 --- a/lib/posix/io.py	Fri Dec 09 16:26:50 2016 +0100
     1.2 +++ b/lib/posix/io.py	Fri Dec 09 17:27:30 2016 +0100
     1.3 @@ -21,7 +21,12 @@
     1.4  
     1.5  from __builtins__.file import filestream
     1.6  from __builtins__.types import check_int, check_string
     1.7 -import native
     1.8 +from native import (
     1.9 +    close as _close,
    1.10 +    fdopen as _fdopen,
    1.11 +    read as _read,
    1.12 +    write as _write
    1.13 +    )
    1.14  
    1.15  # Abstractions for system-level files and streams.
    1.16  
    1.17 @@ -78,7 +83,7 @@
    1.18  
    1.19      "Close the file descriptor 'fd'."
    1.20  
    1.21 -    native.close(fd)
    1.22 +    _close(fd)
    1.23  
    1.24  def closerange(fd_low, fd_high): pass
    1.25  def dup(fd): pass
    1.26 @@ -97,7 +102,7 @@
    1.27  
    1.28      check_int(fd)
    1.29      check_string(mode)
    1.30 -    return native.fdopen(fd, mode)
    1.31 +    return _fdopen(fd, mode)
    1.32  
    1.33  def fpathconf(fd, name): pass
    1.34  def fstat(fd): pass
    1.35 @@ -124,7 +129,7 @@
    1.36  
    1.37      check_int(fd)
    1.38      check_int(n)
    1.39 -    return native.read(fd, n)
    1.40 +    return _read(fd, n)
    1.41  
    1.42  def times(): pass
    1.43  def ttyname(fd): pass
    1.44 @@ -138,7 +143,7 @@
    1.45  
    1.46      check_int(fd)
    1.47      check_string(s)
    1.48 -    return native.write(fd, s)
    1.49 +    return _write(fd, s)
    1.50  
    1.51  # Constants.
    1.52