develooper Front page | perl.perl5.porters | Postings from January 2013

Re: perl smokes with -DPERL_GLOBAL_STRUCT (or-DPERL_GLOBAL_STRUCT_PRIVATE)?

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
January 14, 2013 12:36
Subject:
Re: perl smokes with -DPERL_GLOBAL_STRUCT (or-DPERL_GLOBAL_STRUCT_PRIVATE)?
Message ID:
20130114123523.GD2044@iabyn.com
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):

    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.

-- 
More than any other time in history, mankind faces a crossroads. One path
leads to despair and utter hopelessness. The other, to total extinction.
Let us pray we have the wisdom to choose correctly.
    -- Woody Allen

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About