[pypy-commit] pypy default: Tell the annotator that RFile.read cannot return None
rlamy
noreply at buildbot.pypy.org
Wed Sep 10 04:06:02 CEST 2014
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch:
Changeset: r73412:2268afdc52e2
Date: 2014-09-10 03:04 +0100
http://bitbucket.org/pypy/pypy/changeset/2268afdc52e2/
Log: Tell the annotator that RFile.read cannot return None
Since the return value of fread is checked, buf cannot be NULL and s
is therefore really a string.
diff --git a/rpython/rlib/rfile.py b/rpython/rlib/rfile.py
--- a/rpython/rlib/rfile.py
+++ b/rpython/rlib/rfile.py
@@ -323,6 +323,7 @@
if not c_feof(ll_file):
raise _error(ll_file)
s = buf.str(returned_size)
+ assert s is not None
return s
def _readline1(self, raw_buf):
More information about the pypy-commit
mailing list