| From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
|---|---|
| To: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: rename and move AssertVariableIsOfType |
| Date: | 2026-02-16 08:40:28 |
| Message-ID: | 2b407510-c426-464b-ab48-fb2ba233df3d@eisentraut.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 03.02.26 14:39, Bertrand Drouvot wrote:
> Yeah, I gave it a try and I did not choose the same place for all the files.
>
> 1/ basebackup.c
>
> Since changing the remaining StaticAssertStmt to StaticAssertDecl introduces
> a duplicate, I thought it would make sense to:
>
> - remove the StaticAssertStmt
> - move the existing StaticAssertDecl at file scope
>
> As it depends of the literal "2" also used in some computation then I introduced
> TAR_TERMINATION_BLOCKS and used it in the StaticAssertDecl and the functions.
>
> 2/ deadlock.c
>
> It makes sense to keep it near the related code, so:
>
> - changed to StaticAssertDecl
> - Added new braces to avoid Wdeclaration-after-statement to trigger
>
> 3/ aset.c
>
> Changes the StaticAssertStmt to StaticAssertDecl and move it to file scope (that
> looks more appropriate).
>
> Attached 3 patches to ease the review.
>
> After there are no remaining usages of StaticAssertStmt() and we may want to
> deprecate it.
I have committed this.
I changed TAR_TERMINATION_BLOCKS to TAR_NUM_TERMINATION_BLOCKS for a
little bit more clarity. And then I added a comment in c.h that
StaticAssertStmt() is deprecated.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tomas Vondra | 2026-02-16 08:41:01 | Re: index prefetching |
| Previous Message | Hayato Kuroda (Fujitsu) | 2026-02-16 08:33:47 | RE: Improve docs syntax checking and enable it in the meson build |