Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3c25904

Browse files
committed
Jim Ahlstrom patch: BIGCHUNK is too large for 16-bit int.
1 parent 3d37f43 commit 3c25904

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Objects/fileobject.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,11 @@ file_isatty(f, args)
452452
#define SMALLCHUNK BUFSIZ
453453
#endif
454454

455-
#define BIGCHUNK (512*1024)
455+
#if SIZEOF_INT < 4
456+
#define BIGCHUNK (512 * 32)
457+
#else
458+
#define BIGCHUNK (512 * 1024)
459+
#endif
456460

457461
static size_t
458462
new_buffersize(f, currentsize)

0 commit comments

Comments
 (0)