On Fri, 15 Mar 2024 at 01:46, Heikki Linnakangas <hlinn...@iki.fi> wrote: > - the "(int *) &len)" cast is not ok, and will break visibly on > big-endian systems where sizeof(int) != sizeof(size_t).
I think fixing this requires adjusting the signature of internal_flush_buffer() to use size_t instead of int. That also means that PqSendStart and PqSendPointer must also become size_t, or internal_flush() must add local size_t variables to pass to internal_flush_buffer and assign these back again to the global after the call. Upgrading the globals might be the cleaner option. David