develooper Front page | perl.perl5.porters | Postings from February 2008

Perl_regdupe, consting, maint-5.8, threads, etc.

Thread Next
From:
Craig A. Berry
Date:
February 24, 2008 16:16
Subject:
Perl_regdupe, consting, maint-5.8, threads, etc.
Message ID:
p06240810c3e7b24324fb@[172.16.52.1]
Trying to build maint-5.8@33351 with ithreads on VMS, the build dies
due to the following:

         , Perl_regdupe
..........^
%CC-W-PTRMISMATCH, In the initializer for engines[0].regdupe, the 
referenced type of the pointer value "Perl_regdupe" is "function 
(pointer to struct interpreter, pointer to const struct regexp, 
pointer to struct clone_params) returning pointer to struct regexp", 
which is not compatible with "function (pointer to struct 
interpreter, pointer to struct regexp, pointer to struct 
clone_params) returning pointer to struct regexp".
at line number 56 in file D0:[CRAIG.perl-5_8.ext.re]re.c;1

     PL_regdupe = engines[new_state].regdupe;
....^
%CC-W-PTRMISMATCH, In this statement, the referenced type of the 
pointer value "engines[new_state].regdupe" is "function (pointer to 
struct interpreter, pointer to struct regexp, pointer to struct 
clone_params) returning pointer to struct regexp", which is not 
compatible with "function (pointer to struct interpreter, pointer to 
const struct regexp, pointer to struct clone_params) returning 
pointer to struct regexp".
at line number 98 in file D0:[CRAIG.perl-5_8.ext.re]re.c;1

Taking a quick look at smokes, for example:

http://www.nntp.perl.org/group/perl.daily-build.reports/2008/02/msg53938.html

it appears that the problem is not VMS-specific (except that on VMS
you have to work harder to ignore compiler warnings).

The local declarations in re.xs are in fact wrong compared to the
prototype, where the first argument is clearly of type C<const
regexp*>:

$ search proto.h regdupe
PERL_CALLCONV regexp*   Perl_regdupe(pTHX_ const regexp* r,
CLONE_PARAMS* param);

The attached patch gets the declarations in line with the prototype,
but surely there must be something appropriate to integrate from a
later Perl, though I have searched in vain to find it.

-- 
________________________________________
Craig A. Berry
mailto:craigberry@mac.com

"... getting out of a sonnet is much more
  difficult than getting in."
                  Brad Leithauser
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