On Monday-201301-14 7:35, Dave Mitchell wrote: > On Sat, Jan 12, 2013 at 05:25:25PM -0500, Jarkko Hietaniemi wrote: >> (2) how much would actually break if the Perl_get_vtbl() would >> become const? Is one really supposed to be able to modify the vtbl? > > There's this comment in perl.h: > > > /* PERL_GLOBAL_STRUCT_PRIVATE wants to keep global data like the > * magic vtables const, but this is incompatible with SWIG which > * does want to modify the vtables. */ > #ifdef PERL_GLOBAL_STRUCT_PRIVATE > # define EXT_MGVTBL EXTCONST MGVTBL > #else > # define EXT_MGVTBL EXT MGVTBL > #endif > > (added by a certain jhi in 2006): Darn. Foiled by my own former myself. Do I get a prize? > commit bc028b6b7f0f25fba45e10fa46e3fe91dbe9a76d > Author: Jarkko Hietaniemi <jhi@iki.fi> > AuthorDate: Mon Jul 17 12:09:24 2006 +0300 > Commit: Rafael Garcia-Suarez <rgarciasuarez@gmail.com> > CommitDate: Tue Jul 18 21:43:52 2006 +0000 > > make magic vtables const if PERL_GLOBAL_STRUCT_PRIVATE > Message-ID: <44BB2994.5090609@iki.fi> > > > which implies that SWIG at least does (or did) modify the vtable. >Thread Previous | Thread Next