Re: Make foreach_ptr macro work in C++ extensions

2024-10-15 Thread Nathan Bossart
Committed. -- nathan

Re: Make foreach_ptr macro work in C++ extensions

2024-10-14 Thread Bruce Momjian
On Mon, Oct 14, 2024 at 03:29:34PM -0500, Nathan Bossart wrote: > > I think it would be good to backpatch this to PG17 as well, > > as to not introduce some differences in the macro across versions. > > I'd consider this a "low-risk" fix, which our versioning page [0] says is > acceptable for a mi

Re: Make foreach_ptr macro work in C++ extensions

2024-10-14 Thread Nathan Bossart
On Mon, Oct 14, 2024 at 10:05:42PM +0200, Jelte Fennema-Nio wrote: > I've been writing a C++ extension recently and it turns out that the > foreach_ptr macro added in PG17 by one of my patches causes a > compilation failure when used in C++. This is due to C++ its stricter > rules around implicit c

Make foreach_ptr macro work in C++ extensions

2024-10-14 Thread Jelte Fennema-Nio
Jelte Fennema-Nio Date: Mon, 14 Oct 2024 21:54:48 +0200 Subject: [PATCH v1] Make foreach_ptr macro work in C++ extensions C++ has stronger requirements on casting from void pointers than C. It turns out that because of this it's impossible to use the foreach_ptr macro in a C++ extension. This