Commits

Manuel Jacob committed 2f4fc61

Fix.

Comments (0)

Files changed (1)

pypy/objspace/std/longtype.py

                                     unicode_to_decimal_w(space, w_value))
         else:
             try:
-                w_buffer = space.buffer(w_value)
+                buf = space.buffer_w(w_value)
             except OperationError, e:
                 if not e.match(space, space.w_TypeError):
                     raise
                     "long() argument must be a string or a number, not '%T'",
                     w_value)
             else:
-                buf = space.interp_w(Buffer, w_buffer)
                 return string_to_w_long(space, w_longtype, buf.as_str())
     else:
         base = space.int_w(w_base)