2008/12/2 Bram Moolenaar <[EMAIL PROTECTED]>:

> Dominique Pelle wrote:
>
>> 2008/11/29 Bram Moolenaar wrote:
>>
>> > Tony Mechelynck wrote:
>> ...[snip...]
>> >> if_perl.xs:463: null argument where non-null required
>> >>       a line specific to Perl ver. 5.10 (included) to 6.0 (excluded).
>> >
>> > I actually think NULL is OK here.  At least, it has always worked.  I
>> > don't know how to pass something else, one can't simply pass an empty
>> > environment.
>>
>>
>> I see this compilation warning as well. In my Perl the header file
>> /usr/lib/perl/5.10.0/CORE/proto.h on Ubuntu-8.10, I see:
>>
>>
>> PERL_CALLCONV void      Perl_sys_init(int* argc, char*** argv)
>>                         __attribute__nonnull__(1)
>>                         __attribute__nonnull__(2);
>>
>> PERL_CALLCONV void      Perl_sys_init3(int* argc, char*** argv, char*** env)
>>                         __attribute__nonnull__(1)
>>                         __attribute__nonnull__(2)
>>                         __attribute__nonnull__(3);
>>
>>
>> The "__attribute__nonnull(3)" explains why we get the warning.
>>
>> We can probably call the other function Perl_sys_init(...) instead
>> of Perl_sys_init3(...).  The patch below gets rid of the compilation
>> warning but I prefer to let the author of the Perl interface (in CC)
>> verify whether it's correct.
>
> You also need to adjust the other places where "init3" appears.
> Otherwise it looks like a good change to avoid the warning.  Question is
> if it also works with all versions of Perl.


Perl_sys_init3(...) in Vim code appears only in between...

#if (PERL_REVISION == 5) && (PERL_VERSION >= 10)
...
#endif

And since Perl-5.10.0 is the latest version of Perl,
changing Perl_sys_init3 into Perl_sys_init should not
break anything for older versions of Perl.

-- Dominique

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui