]> granicus.if.org Git - postgresql/commit
Fix volatile vs. pointer confusion
authorPeter Eisentraut <peter@eisentraut.org>
Thu, 14 Mar 2019 07:25:25 +0000 (08:25 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Fri, 15 Mar 2019 07:37:48 +0000 (08:37 +0100)
commita1e9508b964155a81ec9a8e6e12be76796d47097
tree0679380904b76049617f85e5f0fc1721ff7925a3
parent5b866005c8b039e7b473ffef1f27b162b0436948
Fix volatile vs. pointer confusion

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 PyObject *items;  /* wrong */

Discussion: https://www.postgresql.org/message-id/flat/f747368d-9e1a-c46a-ac76-3c27da32e8e4%402ndquadrant.com
contrib/hstore_plpython/hstore_plpython.c
contrib/jsonb_plpython/jsonb_plpython.c