Author: Brian Kearns <bdkea...@gmail.com> Branch: use-file-star-for-file Changeset: r73124:b12884a291d1 Date: 2014-08-28 17:52 -0400 http://bitbucket.org/pypy/pypy/changeset/b12884a291d1/
Log: rename some functions for clarity diff --git a/rpython/rlib/rfile.py b/rpython/rlib/rfile.py --- a/rpython/rlib/rfile.py +++ b/rpython/rlib/rfile.py @@ -41,15 +41,15 @@ _IOLBF = config['_IOLBF'] _IOFBF = config['_IOFBF'] -c_open = llexternal('fopen', [rffi.CCHARP, rffi.CCHARP], FILEP) -c_close = llexternal('fclose', [FILEP], rffi.INT, releasegil=False) +c_fopen = llexternal('fopen', [rffi.CCHARP, rffi.CCHARP], FILEP) +c_fclose = llexternal('fclose', [FILEP], rffi.INT, releasegil=False) c_fwrite = llexternal('fwrite', [rffi.CCHARP, rffi.SIZE_T, rffi.SIZE_T, FILEP], rffi.SIZE_T) c_fread = llexternal('fread', [rffi.CCHARP, rffi.SIZE_T, rffi.SIZE_T, FILEP], rffi.SIZE_T) c_feof = llexternal('feof', [FILEP], rffi.INT) c_ferror = llexternal('ferror', [FILEP], rffi.INT) -c_clearerror = llexternal('clearerr', [FILEP], lltype.Void) +c_clearerr = llexternal('clearerr', [FILEP], lltype.Void) c_fseek = llexternal('fseek', [FILEP, rffi.LONG, rffi.INT], rffi.INT) c_tmpfile = llexternal('tmpfile', [], FILEP) @@ -73,7 +73,7 @@ def _error(ll_file): errno = c_ferror(ll_file) - c_clearerror(ll_file) + c_clearerr(ll_file) raise OSError(errno, os.strerror(errno)) @@ -84,7 +84,7 @@ try: ll_mode = rffi.str2charp(mode) try: - ll_f = c_open(ll_name, ll_mode) + ll_f = c_fopen(ll_name, ll_mode) if not ll_f: errno = rposix.get_errno() raise OSError(errno, os.strerror(errno)) @@ -173,7 +173,7 @@ raise OSError(errno, os.strerror(errno)) return res - _do_close = staticmethod(c_close) # overridden in RPopenFile + _do_close = staticmethod(c_fclose) # overridden in RPopenFile def read(self, size=-1): # XXX CPython uses a more delicate logic here _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit