develooper Front page | perl.perl5.porters | Postings from September 2012

Win32 build failure was: Re: Smoke[smoke-me/davem/regex-trailing-null] v5.17.3-369-g4eb6563 FAIL(M) MSWin32Win2000 SP4 (x86/1 cpu)

Thread Next
From:
Dave Mitchell
Date:
September 21, 2012 16:01
Subject:
Win32 build failure was: Re: Smoke[smoke-me/davem/regex-trailing-null] v5.17.3-369-g4eb6563 FAIL(M) MSWin32Win2000 SP4 (x86/1 cpu)
Message ID:
20120921230148.GN3534@iabyn.com
On Fri, Sep 21, 2012 at 05:38:00PM -0400, George Greer wrote:
> perl-win2k: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz(~2670 MHz) (x86/1 cpu)
>     on        MSWin32 - Win2000 SP4
>     using     cl version 14.00.50727.762
>     smoketime 46 minutes 49 seconds (average 11 minutes 42 seconds)

> v5.17.3-369-g4eb6563  Configuration (common) none
> ----------- ---------------------------------------------------------
> M M         
> M M         -Duseithreads
> | +--------- -DDEBUGGING
> +----------- no debugging

> APItest.xs(3420) : error C2143: syntax error : missing ';' before 'type'
> APItest.xs(3428) : error C2065: 'strbeg' : undeclared identifier
> APItest.xs(3428) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'STRLEN'
> APItest.xs(3428) : warning C4024: 'function through pointer' : different types for formal and actual parameter 2
> APItest.xs(3428) : warning C4024: 'function through pointer' : different types for formal and actual parameter 3
> APItest.xs(3428) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int'
> APItest.xs(3428) : warning C4024: 'function through pointer' : different types for formal and actual parameter 4
> APItest.xs(3428) : warning C4024: 'function through pointer' : different types for formal and actual parameter 5

I'm mystified by that first syntax error (I assume the following errors
and warnings are just a consequence of the original error).

Here's the new XS function I've added:

3413: I32
3414: callregexec(SV *prog, STRLEN stringarg, STRLEN strend, I32 minend, SV *sv, U32 nosave)
3415: CODE:
3416:     {
3417: 	STRLEN len;
3418: 	if (SvROK(prog))
3419: 	    prog = SvRV(prog);
3420: 	char *strbeg = SvPV_force(sv, len);
3421: 	RETVAL = CALLREGEXEC((REGEXP *)prog,
3422: 			    strbeg + stringarg,
3423: 			    strbeg + strend,
3424: 			    strbeg,
3425: 			    minend,
3426: 			    sv,
3427: 			    NULL, /* data */
3428: 			    nosave);
3429:     }
3430: OUTPUT:
3431:     RETVAL

It compiles fine on Linux, and I've stared at line 3420 and the preceding
lines till my eyes bleed, but I can't see anything wrong with it.

-- 
The Enterprise is captured by a vastly superior alien intelligence which
does not put them on trial.
    -- Things That Never Happen in "Star Trek" #10

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