Re: Writing triggers in C++

Поиск
Список
Период
Сортировка
От Florian G. Pflug
Тема Re: Writing triggers in C++
Дата
Msg-id 45D3465F.7080607@phlo.org
обсуждение исходный текст
Ответ на Re: Writing triggers in C++  (Neil Conway <neilc@samurai.com>)
Ответы Re: Writing triggers in C++  ("bjarne" <bjarne@gmail.com>)
Список pgsql-hackers
Neil Conway wrote:
> On Wed, 2007-02-14 at 13:19 -0300, Alvaro Herrera wrote:
>> Probably stack allocation doesn't matter much, as I think that would be
>> unwinded by the longjmp call.  I don't know a lot about C++, but if
>> there are allocations in the data area then those would probably not be
>> freed.  But it makes me wonder -- is longjmp very compatible with C++
>> exceptions at all?
> 
> "C-style stack unwinding (using setjmp and longjmp from <csetjmp>) is
> incompatible with exception-handling and is best avoided." (Stroustrup,
> p. 433).
> 
> Which presumably means that in practice, the interaction between these
> features is implementation-defined.

Well, as long as you don't longjmp "past" an C++ catch block, and don't
throw an C++ exception "past" an setjmp handler, there should be no 
problem I think. Or at least I can't imagine how a problem could arise..

greetings, Florian Pflug


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

Предыдущее
От: "Florian G. Pflug"
Дата:
Сообщение: Re: Writing triggers in C++
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: integer datetimes