Re: Fix volatile vs. pointer confusion

2019-03-14 Thread Peter Eisentraut
On 2019-03-11 08:23, Peter Eisentraut wrote: > Variables used after a longjmp() need to be declared volatile. In > case of a pointer, it's the pointer itself that needs to be declared > volatile, not the pointed-to value. So we need > > PyObject *volatile items; > > instead of > > vola

Re: Fix volatile vs. pointer confusion

2019-03-13 Thread Peter Eisentraut
On 2019-03-11 12:57, Alvaro Herrera wrote: > Looking at recently committed 2e616dee9e60, we have introduced this: > > + volatile xmlBufferPtr buf = NULL; > + volatile xmlNodePtr cur_copy = NULL; > > where the pointer-ness nature of the object is inside the typedef. I > *suppose* that

Re: Fix volatile vs. pointer confusion

2019-03-13 Thread Peter Eisentraut
On 2019-03-11 09:31, Michael Paquier wrote: > On Mon, Mar 11, 2019 at 08:23:39AM +0100, Peter Eisentraut wrote: >> Attached patch fixes a couple of cases of that. Most instances were >> already correct. > > It seems to me that you should look at that: > https://www.postgresql.org/message-id/20190

Re: Fix volatile vs. pointer confusion

2019-03-11 Thread Alvaro Herrera
On 2019-Mar-11, Peter Eisentraut wrote: > Variables used after a longjmp() need to be declared volatile. In > case of a pointer, it's the pointer itself that needs to be declared > volatile, not the pointed-to value. So we need > > PyObject *volatile items; > > instead of > > volatile

Re: Fix volatile vs. pointer confusion

2019-03-11 Thread Michael Paquier
On Mon, Mar 11, 2019 at 08:23:39AM +0100, Peter Eisentraut wrote: > Attached patch fixes a couple of cases of that. Most instances were > already correct. It seems to me that you should look at that: https://www.postgresql.org/message-id/20190308055911.gg4...@paquier.xyz They treat about the same