syphilis has asked for the wisdom of the Perl Monks concerning the following question:
Running on perl 5.6 I get the following warning during compilation:use Inline C => Config => CLEAN_AFTER_BUILD => 1, BUILD_NOISY => 1; use Inline C => <<'EOC'; SV * foo(FILE * stream) { return newSVuv(42); } EOC print foo(*STDOUT);
Looking at the C file I see that line 28 is:try_pl_0446.c: In function `XS_main_foo': try_pl_0446.c:28: warning: initialization from incompatible pointer ty +pe
The same script, run under perl 5.8 produces no compiler warnings. The corresponding line in the C file is:FILE * stream = IoIFP(sv_2io(ST(0)));
(Note that in both instances the C file was autogenerated by ExtUtils::ParseXS version 2.17.)FILE * stream = PerlIO_findFILE(IoIFP(sv_2io(ST(0))));
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: FILE* ... perl 5.6 ... backwards compatibility
by BrowserUk (Patriarch) on Dec 05, 2007 at 13:03 UTC | |
by syphilis (Archbishop) on Dec 06, 2007 at 00:27 UTC |