| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: fe_utils: Sprinkle some pg_malloc_object() and pg_malloc_array() |
| Date: | 2026-02-24 03:36:27 |
| Message-ID: | E1vujDn-000urw-1W@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
fe_utils: Sprinkle some pg_malloc_object() and pg_malloc_array()
The idea is to encourage more the use of these allocation routines
across the tree, as these offer stronger type safety guarantees than
pg_malloc() & friends (type cast in the result, sizeof() embedded).
This commit updates some code paths of src/fe_utils/.
This commit is similar to 31d3847a37be.
Author: Henrik TJ <henrik(at)0x48(dot)dk>
Reviewed-by: Andreas Karlsson <andreas(at)proxel(dot)se>
Discussion: https://postgr.es/m/6df1b64e-1314-9afd-41a3-3fefb76225e1@0x48.dk
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/ff393fa526648c091a3492da3bd6dd140e3c55e7
Modified Files
--------------
src/fe_utils/conditional.c | 4 ++--
src/fe_utils/print.c | 48 +++++++++++++++++++++++-----------------------
src/fe_utils/psqlscan.l | 8 ++++----
src/fe_utils/simple_list.c | 4 ++--
4 files changed, 32 insertions(+), 32 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2026-02-24 03:56:00 | pgsql: doc: Adjust some markups on pg_waldump page |
| Previous Message | Tom Lane | 2026-02-24 02:08:56 | Re: pgsql: libpq: Grease the protocol by default |