Commits

Brian Kearns committed 53a0d2a

reorder

  • Participants
  • Parent commits 820aa0f
  • Branches refactor-buffer-api

Comments (0)

Files changed (1)

pypy/interpreter/baseobjspace.py

     BUF_WRITABLE = 4
 
     def check_buf_flags(self, flags, readonly):
-        if flags & self.BUF_WRITABLE == self.BUF_WRITABLE and readonly:
+        if readonly and flags & self.BUF_WRITABLE == self.BUF_WRITABLE:
             raise oefmt(self.w_BufferError, "Object is not writable.")
 
     def buffer_w(self, w_obj, flags):