Re: arrays as pl/perl input arguments [PATCH]

Поиск
Список
Период
Сортировка
От Alex Hunsaker
Тема Re: arrays as pl/perl input arguments [PATCH]
Дата
Msg-id AANLkTi=r62p820N-RgKLnwu=nSdiJ_KBzyegavYLCY4N@mail.gmail.com
обсуждение исходный текст
Ответ на Re: arrays as pl/perl input arguments [PATCH]  (Alex Hunsaker <badalex@gmail.com>)
Список pgsql-hackers
On Tue, Feb 8, 2011 at 10:33, Alex Hunsaker <badalex@gmail.com> wrote:
> On Tue, Feb 8, 2011 at 08:18, Alexey Klyukin <alexk@commandprompt.com> wrote:
>> Thanks, looks great to me. It passes all the tests on my OS X system. I wonder
>> what's the purpose of the amagic_call in get_perl_array_ref, instead of
>> calling newRV_noinc on the target SV * ?
>
> Well, you can't AV *av = (AV *)SvRV(sv); And the SV * amagic_call
> returns is already a reference, so the newRV_noinc() would be
> redundant no? It occurs to me instead of doing the amagic_call we
> could just call the to_array method directly using perl_call_pv().
> That would look more normal and less magic-- thats probably a good
> thing?

Err, even simpler would be to just access the 'array' member directly
out of the hash object.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "David E. Wheeler"
Дата:
Сообщение: Re: Extensions versus pg_upgrade
Следующее
От: Dan Ports
Дата:
Сообщение: Re: SSI patch version 14