Commits

Armin Rigo committed 4fe5af4

For now, disable buffering on the FILE object, to avoid issues.

  • Participants
  • Parent commits c261cc2

Comments (0)

Files changed (1)

File pypy/module/_cffi_backend/ctypeptr.py

 
 
 rffi_fdopen = rffi.llexternal("fdopen", [rffi.INT, rffi.CCHARP], rffi.CCHARP)
+rffi_setbuf = rffi.llexternal("setbuf", [rffi.CCHARP,rffi.CCHARP], lltype.Void)
 rffi_fclose = rffi.llexternal("fclose", [rffi.CCHARP], rffi.INT)
 
 class CffiFileObj(object):
         self.llf = rffi_fdopen(fd, mode)
         if not self.llf:
             raise OSError(rposix.get_errno(), "fdopen failed")
+        rffi_setbuf(self.llf, lltype.nullptr(rffi.CCHARP.TO))
     def close(self):
         rffi_fclose(self.llf)