I have a typemap that looks like:

INPUT

O_OBJECT
        if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG) )
                $var = ($type)SvIV((SV*)SvRV( $arg ));
        else{
                warn( \"${Package}::$func_name() -- $var is not a blessed SV 
reference\" );
                XSRETURN_UNDEF;
        }

Works fine on may platforms, but I just tried on FreeBSD 5.4-STABLE
i386 gcc 3.4.2, perl v5.8.7 I see

  Aspell.c:98: warning: cast to pointer from integer of different size


     88 XS(XS_Text__Aspell_DESTROY); /* prototype to pass -Wmissing-prototypes 
*/
     89 XS(XS_Text__Aspell_DESTROY)
     90 {
     91     dXSARGS;
     92     if (items != 1)
     93         Perl_croak(aTHX_ "Usage: Text::Aspell::DESTROY(self)");
     94     {
     95         Aspell_object * self;
     96 
     97         if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
     98                 self = (Aspell_object *)SvIV((SV*)SvRV( ST(0) ));
     99         else{ 
    100                 warn( "Text::Aspell::DESTROY() -- self is not a blessed 
SV reference" );
    101                 XSRETURN_UNDEF;
    102         };
    103 #line 78 "Aspell.xs"
    104         if ( self->speller )
    105             delete_aspell_speller(self->speller);
    106 
    107         safefree( (char*)self );
    108 #line 109 "Aspell.c"
    109     }
    110     XSRETURN_EMPTY;
    111 }

Is there a better way to write the typemap?  I'm not really clear
why this message is showing up now.  Change in gcc?

Thanks



-- 
Bill Moseley
[EMAIL PROTECTED]

Reply via email to