Author: Brian Kearns <bdkea...@gmail.com>
Branch: rpython-enverror
Changeset: r73325:1ff37a253216
Date: 2014-09-05 15:12 -0400
http://bitbucket.org/pypy/pypy/changeset/1ff37a253216/

Log:    fix

diff --git a/rpython/rtyper/rbuiltin.py b/rpython/rtyper/rbuiltin.py
--- a/rpython/rtyper/rbuiltin.py
+++ b/rpython/rtyper/rbuiltin.py
@@ -3,9 +3,10 @@
 from rpython.rlib import rarithmetic, objectmodel
 from rpython.rtyper import raddress, rptr, extregistry, rrange
 from rpython.rtyper.error import TyperError
-from rpython.rtyper.lltypesystem import lltype, llmemory, rclass
+from rpython.rtyper.lltypesystem import lltype, llmemory, rclass, rstr
 from rpython.rtyper.lltypesystem.rdict import rtype_r_dict
 from rpython.rtyper.rmodel import Repr
+from rpython.rtyper.rstr import AbstractStringRepr
 from rpython.tool.pairtype import pairtype
 
 
@@ -272,10 +273,11 @@
         v_errno = hop.inputarg(lltype.Signed, arg=1)
         r_self.setfield(v_self, 'errno', v_errno, hop.llops)
         if hop.nb_args >= 3:
-            v_strerror = hop.inputarg(hop.args_r[2], arg=2)
-        else:
-            v_strerror = None
-        r_self.setfield(v_self, 'strerror', v_strerror, hop.llops)
+            v_strerror = hop.inputarg(rstr.string_repr, arg=2)
+            r_self.setfield(v_self, 'strerror', v_strerror, hop.llops)
+            if hop.nb_args >= 4:
+                v_filename = hop.inputarg(rstr.string_repr, arg=3)
+                r_self.setfield(v_self, 'filename', v_filename, hop.llops)
 
 def rtype_WindowsError__init__(hop):
     hop.exception_cannot_occur()
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to