----- Original Message ----- From: "Xiao Yafeng" <xyf.x...@gmail.com>
To: "Sisyphus" <sisyph...@optusnet.com.au>
Cc: "inline" <inline@perl.org>
Sent: Wednesday, September 07, 2011 2:53 PM
Subject: Re: strange line


Thanks, Sisyphus. I've posted this question on perlmonks.
but I don't understand below warning:
C:\MinGW\perl\lib\CORE/proto.**h:2567:19: note: expected 'struct SV * const'
but argument is of type 'struct AV *'
I does return a SV* other than AV*.

=================================

I think it's just complaining that you've supplied an AV* to newRV_inc(), but that function expects to receive an SV*.

As I (later) mentioned on the perlmonks thread, I think the right thing to do is to change

SV * process_list(){
to
AV* process_list(){

and to change

return newRV_inc(AV_procs);
to
return AV_procs;

That gets rid of the warning for me.

Incidentally, I got that warning only with gcc-4.5.2 - not with gcc-3.4.5.

Cheers,
Rob

Reply via email to