Re: PL/Perl Does not Like vstrings

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: PL/Perl Does not Like vstrings
Дата
Msg-id 8F0C5426-FC43-46E7-935A-BC0E50E268B2@justatheory.com
обсуждение исходный текст
Ответ на Re: PL/Perl Does not Like vstrings  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: PL/Perl Does not Like vstrings  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
On Jan 4, 2012, at 2:48 PM, Andrew Dunstan wrote:

>> That's kinda grotty ... and leaky ...
>>
>
> Of course it is. It wasn't meant as a solution but as validation of your suspicions about the nature of the problem.
(Theleakiness could be solved, though.) 

From #p5p on irc.perl.org:

[10:58pm]dg:interesting, so SvPV() handles string overloading, but SvPVutf8() doesn't, yet: "Like C<SvPV>, but converts
svto utf8 first if necessary." 
[10:58pm]dg:oh, only for readonly objects
[10:58pm]dg:probably why no-one has noticed, as version is probably the only readonly thing with string overloading
[11:08pm]TonyC:it doesn't need string overloading
[11:09pm]TonyC:https://gist.github.com/1562734
[11:12pm]TonyC:theory: using sv_mortalcopy() instead of newSVsv() should prevent the leak in that workaround, assuming
there'sno FREETMPS between the call and use of the return value 

Useful?

David



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

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: Autonomous subtransactions
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_restore direct to database is broken for --insert dumps