Hi,

I am having some problem with constants as return values.

I am trying to Perl wrap this API.
const wchar_t* ErrorString(long hr)

My XS code looks like this ..
const wchar_t*
MDS_ErrorString(hr)
        long hr
        CODE :
               RETVAL = MDS_ErrorString(hr);
        OUTPUT :
        RETVAL

My typemap is :
const wchar_t* T_PV

While compiling I do get the following error. I am using the Sun's CC
compiler.

"XSConfig.c", line 59: Error: Formal argument ptr of type const char* in
call to Perl_sv_setpv(sv*, const char*) is being passed const wchar_t*.

What am I doing wrong ? Is there a special way to deal with constants ?

Thanks,
Soumen

Reply via email to