summaryrefslogtreecommitdiff
path: root/perlio.h
diff options
context:
space:
mode:
authorDaniel Dragan <bulk88@hotmail.com>2014-12-25 17:50:23 -0500
committerFather Chrysostomos <sprout@cpan.org>2014-12-27 10:52:30 -0800
commitf0e5c859d36afe5a36325793f8c14f71229c5ba4 (patch)
tree32becbdfe4994a5f6cded22a03dfba80f61e9e46 /perlio.h
parentebf27bc85d964536463e823bbdbdb42456bdbf70 (diff)
downloadperl-f0e5c859d36afe5a36325793f8c14f71229c5ba4.tar.gz
const the PerlIO vtables
Previously the PerlIO vtables were const only on PERL_GLOBAL_STRUCT_PRIVATE builds, which was created for former Symbian port and today is rarely used. Since writing/hooking the PerlIO vtables from XS has never been public API and is very unlikely to be occuring on CPAN, make then const so they will be shared between perl processes. b4 VC2008 x64 perl521.dll .rdata section 0x7293C bytes, .data 0x34B0 bytes after .rdata 0x7321C .data 0x2BD0
Diffstat (limited to 'perlio.h')
-rw-r--r--perlio.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/perlio.h b/perlio.h
index 777c886f3f..dc80d086f7 100644
--- a/perlio.h
+++ b/perlio.h
@@ -86,10 +86,8 @@ typedef PerlIOl *PerlIO;
#define PerlIO PerlIO
#define PERLIO_LAYERS 1
-/* Making the big PerlIO_funcs vtables const is good (enables placing
- * them in the const section which is good for speed, security, and
- * embeddability) but this cannot be done by default because of
- * backward compatibility. */
+/* PERLIO_FUNCS_CONST is now on by default for efficiency, PERLIO_FUNCS_CONST
+ can be removed 1 day once stable & then PerlIO vtables are permanently RO */
#ifdef PERLIO_FUNCS_CONST
#define PERLIO_FUNCS_DECL(funcs) const PerlIO_funcs funcs
#define PERLIO_FUNCS_CAST(funcs) (PerlIO_funcs*)(funcs)