This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Rename PERLIO_BUFSIZ to PERLIOBUF_DEFAULT_BUFSIZ.
authorCraig A. Berry <craigberry@mac.com>
Thu, 11 Nov 2010 03:23:48 +0000 (21:23 -0600)
committerCraig A. Berry <craigberry@mac.com>
Thu, 11 Nov 2010 03:23:48 +0000 (21:23 -0600)
PERLIO_BUFSIZ was already in use by Encode::Unicode for the
PerlIOEncode_xxx layer, so it makes sense to specify that this
macro is for the PerlIOBuf_xxx layer and that it is a default
value that may eventually be settable at run-time.

perlio.c
perlio.h

index 5b39679..13b1351 100644 (file)
--- a/perlio.c
+++ b/perlio.c
@@ -4120,7 +4120,7 @@ PerlIOBuf_get_base(pTHX_ PerlIO *f)
 
     if (!b->buf) {
        if (!b->bufsiz)
-           b->bufsiz = PERLIO_BUFSIZ;
+           b->bufsiz = PERLIOBUF_DEFAULT_BUFSIZ;
        Newxz(b->buf,b->bufsiz, STDCHAR);
        if (!b->buf) {
            b->buf = (STDCHAR *) & b->oneword;
index a1436c6..62e35e4 100644 (file)
--- a/perlio.h
+++ b/perlio.h
@@ -189,8 +189,9 @@ PERL_EXPORT_C void PerlIO_clone(pTHX_ PerlInterpreter *proto,
 #define BUFSIZ 1024
 #endif
 
-#ifndef PERLIO_BUFSIZ
-#define PERLIO_BUFSIZ 4096
+/* The default buffer size for the perlio buffering layer */
+#ifndef PERLIOBUF_DEFAULT_BUFSIZ
+#define PERLIOBUF_DEFAULT_BUFSIZ 4096
 #endif
 
 #ifndef SEEK_SET