pgsql: Remove bits* typedefs. - Mailing list pgsql-committers

From Nathan Bossart
Subject pgsql: Remove bits* typedefs.
Date
Msg-id E1w7Juc-002Co4-1f@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Remove bits* typedefs.

In addition to removing the bits8, bits16, and bits32 typedefs,
this commit replaces all uses with uint8, uint16, or uint32.  bits*
provided little benefit beyond establishing the intent of the
variable, and they were inconsistently used for that purpose.
Third-party code should instead use the corresponding uint*
typedef.

Suggested-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Reviewed-by: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Discussion: https://postgr.es/m/absbX33E4eaA0Ity%40nathan

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/bab2f27eaaad77f799ecc224f9e11b09adb07d5a

Modified Files
--------------
contrib/dblink/dblink.c                     |  2 +-
contrib/pageinspect/gistfuncs.c             |  2 +-
contrib/pageinspect/heapfuncs.c             | 16 +++----
contrib/postgres_fdw/deparse.c              |  2 +-
doc/src/sgml/fdwhandler.sgml                |  4 +-
src/backend/access/brin/brin_tuple.c        | 20 ++++----
src/backend/access/common/heaptuple.c       | 16 +++----
src/backend/access/common/indextuple.c      | 12 ++---
src/backend/access/common/reloptions.c      | 28 +++++------
src/backend/access/spgist/spgutils.c        | 10 ++--
src/backend/catalog/index.c                 |  6 +--
src/backend/catalog/indexing.c              |  2 +-
src/backend/catalog/objectaddress.c         | 12 ++---
src/backend/commands/indexcmds.c            |  4 +-
src/backend/commands/subscriptioncmds.c     |  8 ++--
src/backend/commands/tablecmds.c            |  2 +-
src/backend/commands/vacuum.c               |  4 +-
src/backend/executor/execExprInterp.c       |  8 ++--
src/backend/executor/execIndexing.c         |  2 +-
src/backend/executor/execReplication.c      |  4 +-
src/backend/executor/execTuples.c           |  2 +-
src/backend/executor/nodeModifyTable.c      |  2 +-
src/backend/foreign/foreign.c               |  4 +-
src/backend/nodes/gen_node_support.pl       |  3 +-
src/backend/postmaster/bgworker.c           |  4 +-
src/backend/postmaster/syslogger.c          |  2 +-
src/backend/utils/activity/pgstat_backend.c |  2 +-
src/backend/utils/adt/array_userfuncs.c     | 10 ++--
src/backend/utils/adt/arrayfuncs.c          | 68 +++++++++++++-------------
src/backend/utils/adt/format_type.c         |  4 +-
src/backend/utils/adt/misc.c                |  2 +-
src/backend/utils/adt/regproc.c             |  4 +-
src/backend/utils/adt/ruleutils.c           |  2 +-
src/backend/utils/adt/varbit.c              | 74 ++++++++++++++---------------
src/backend/utils/adt/varlena.c             |  2 +-
src/backend/utils/fmgr/funcapi.c            |  2 +-
src/backend/utils/init/postinit.c           |  2 +-
src/bin/pg_basebackup/pg_createsubscriber.c |  2 +-
src/bin/psql/tab-complete.in.c              |  4 +-
src/bin/scripts/vacuumdb.c                  |  4 +-
src/bin/scripts/vacuuming.h                 |  2 +-
src/include/access/htup_details.h           |  6 +--
src/include/access/itup.h                   |  6 +--
src/include/access/reloptions.h             | 14 +++---
src/include/access/tupmacs.h                |  8 ++--
src/include/c.h                             |  8 ----
src/include/catalog/index.h                 |  8 ++--
src/include/commands/cluster.h              |  2 +-
src/include/commands/vacuum.h               |  6 +--
src/include/common/jsonapi.h                |  2 +-
src/include/executor/executor.h             |  2 +-
src/include/executor/instrument_node.h      |  2 +-
src/include/foreign/foreign.h               |  4 +-
src/include/funcapi.h                       |  2 +-
src/include/miscadmin.h                     |  2 +-
src/include/nodes/parsenodes.h              |  2 +-
src/include/port/pg_bitutils.h              |  8 ++--
src/include/postmaster/syslogger.h          |  2 +-
src/include/replication/reorderbuffer.h     |  2 +-
src/include/replication/walsender_private.h |  2 +-
src/include/utils/array.h                   | 10 ++--
src/include/utils/arrayaccess.h             |  2 +-
src/include/utils/builtins.h                |  2 +-
src/include/utils/pgstat_internal.h         |  2 +-
src/include/utils/regproc.h                 |  4 +-
src/include/utils/ruleutils.h               |  2 +-
src/include/utils/varbit.h                  |  6 +--
src/pl/plpython/plpy_typeio.c               |  8 ++--
src/port/pg_bitutils.c                      |  4 +-
src/port/pg_popcount_aarch64.c              | 16 +++----
src/port/pg_popcount_x86.c                  | 14 +++---
src/test/modules/worker_spi/worker_spi.c    |  8 ++--
src/tools/pgindent/typedefs.list            |  3 --
73 files changed, 261 insertions(+), 273 deletions(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Use ShmemInitStruct to allocate shmem for semaphores
Next
From: Jacob Champion
Date:
Subject: pgsql: libpq: Add oauth_ca_file option to change CAs without debugging