On Sun, Oct 12, 2008 at 01:30:05PM -0700, Marcus Holland-Moritz wrote:
> Change 34475 by [EMAIL PROTECTED] on 2008/10/12 20:23:51
> 
>       Upgrade to Devel::PPPort 3.14_02
> 

> -SV *
> -PL_expect()
> +PL_rsfp()
> +        PREINIT:
> +                void * volatile my_rsfp;
> +             /* no pointer test, as we don't know the exact type */
>       CODE:
> -             RETVAL = newSViv((IV) PL_expect);
> +                my_rsfp = PL_rsfp;
> +             RETVAL = newSViv(PL_rsfp != 0);
> +                PL_rsfp = my_rsfp;
>       OUTPUT:
>               RETVAL

ie:

SV *
PL_rsfp()
        PREINIT:
                void * volatile my_rsfp;
                /* no pointer test, as we don't know the exact type */
        CODE:
                my_rsfp = PL_rsfp;
                RETVAL = newSViv(PL_rsfp != 0);
                PL_rsfp = my_rsfp;
        OUTPUT:
                RETVAL

unfortunately that assignment back to PL_rsfp barfs under C++:

ccache g++ -c   -DDEBUG_LEAKING_SCALARS_ABORT -DDEBUGGING -fno-strict-aliasing 
-pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -g   -DVERSION=\"3.14_02\" -DXS_VERSION=\"3.14_02\" 
-fPIC "-I../../.."   RealPPPort.c
RealPPPort.xs: In function 'void XS_Devel__PPPort_PL_rsfp(CV*)':
RealPPPort.xs:1134: error: invalid conversion from 'void* volatile' to 
'PerlIOl**'
make[1]: *** [RealPPPort.o] Error 1


I'm not sure what the best thing to do is. Is there a quick fix to make that
function (and related macros) unavailable under __cplusplus?

Nicholas Clark

Reply via email to