in reply to Re: Layer does not match this perl
in thread Layer does not match this perl

*sigh* Reasonable code would be more like:

if (tab->fsize != sizeof(PerlIO_funcs)) { Perl_croak( aTHX_ "%s (%d) does not match %s (%d)", "PerlIO layer function table size", tab->fsize, "size expected by this perl", sizeof(PerlIO_funcs) ); } if (tab->size) { PerlIOl *l; if (tab->size < sizeof(PerlIOl)) { Perl_croak( aTHX_ "%s (%d) smaller than %s (%d)", "PerlIO layer instance size", tab->size, "size expected by this perl", sizeof(PerlIOl) ); }

See also http://perl5.git.perl.org/perl.git/blob?f=pod/perliol.pod.

- tye        

Replies are listed 'Best First'.
Re^3: Layer does not match this perl (sigh)
by Corion (Patriarch) on Mar 22, 2010 at 17:54 UTC

      Thanks very much for submitting that. I suggest the diagnostics be made more specific. Instead of:

      +%s (%d) does not match %s (%d), +%s (%d) smaller than %s (%d),

      Use:

      "PerlIO layer function table size (%d) does not match size expected by + this perl (%d)", "PerlIO layer instance size (%d) smaller than size expected by this pe +rl (%d)",

      But I also don't know if the format strings not matching the format strings used in the source code could present some type of problem.

      - tye        

        The old message wasn't properly detected by perldiag.t either, so either the extraction of (missing) messages from the source is faulty or I don't understand what perldiag.t is supposed to test. But changing the messages shouldn't affect anything. I'll send another patch unless somebody else sends it first (remember to mention the RT ticket number).