Thread: pgsql: Replace int2/int4 in C code with int16/int32

pgsql: Replace int2/int4 in C code with int16/int32

From
Peter Eisentraut
Date:
Replace int2/int4 in C code with int16/int32

The latter was already the dominant use, and it's preferable because
in C the convention is that intXX means XX bits.  Therefore, allowing
mixed use of int2, int4, int8, int16, int32 is obviously confusing.

Remove the typedefs for int2 and int4 for now.  They don't seem to be
widely used outside of the PostgreSQL source tree, and the few uses
can probably be cleaned up by the time this ships.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/b8b2e3b2deeaab19715af063fc009b7c230b2336

Modified Files
--------------
contrib/btree_gist/btree_int2.c             |   10 ++--
contrib/btree_gist/btree_int4.c             |   10 ++--
contrib/cube/cube.c                         |    4 +-
contrib/hstore/hstore.h                     |    4 +-
contrib/hstore/hstore_gist.c                |   30 +++++-----
contrib/hstore/hstore_io.c                  |   32 +++++-----
contrib/intarray/_int.h                     |   18 +++---
contrib/intarray/_int_bool.c                |   82 +++++++++++++-------------
contrib/intarray/_int_gin.c                 |    2 +-
contrib/intarray/_int_gist.c                |    8 +-
contrib/intarray/_int_tool.c                |   16 +++---
contrib/intarray/_intbig_gist.c             |   32 +++++-----
contrib/ltree/_ltree_gist.c                 |   26 ++++----
contrib/ltree/ltree.h                       |   16 +++---
contrib/ltree/ltree_gist.c                  |   12 ++--
contrib/ltree/ltree_op.c                    |    8 +-
contrib/ltree/ltxtquery_io.c                |   74 ++++++++++++------------
contrib/ltree/ltxtquery_op.c                |    4 +-
contrib/pg_trgm/trgm_gist.c                 |   52 +++++++++---------
doc/src/sgml/xfunc.sgml                     |   13 +++-
src/backend/access/hash/hashfunc.c          |    2 +-
src/backend/access/spgist/spgquadtreeproc.c |    2 +-
src/backend/catalog/Catalog.pm              |    2 +
src/backend/catalog/namespace.c             |    2 +-
src/backend/catalog/pg_type.c               |    2 +-
src/backend/commands/cluster.c              |    4 +-
src/backend/commands/trigger.c              |   18 +++---
src/backend/optimizer/prep/prepunion.c      |    2 +-
src/backend/parser/parse_utilcmd.c          |    2 +-
src/backend/tsearch/to_tsany.c              |   14 ++--
src/backend/tsearch/ts_parse.c              |    2 +-
src/backend/tsearch/wparser_def.c           |   22 ++++----
src/backend/utils/adt/arrayfuncs.c          |    4 +-
src/backend/utils/adt/int.c                 |    8 +-
src/backend/utils/adt/ruleutils.c           |    6 +-
src/backend/utils/adt/tsginidx.c            |    2 +-
src/backend/utils/adt/tsgistidx.c           |   78 +++++++++++++-------------
src/backend/utils/adt/tsquery.c             |    2 +-
src/backend/utils/adt/tsquery_gist.c        |    8 +-
src/backend/utils/adt/tsrank.c              |   12 ++--
src/backend/utils/adt/tsvector.c            |    2 +-
src/backend/utils/adt/tsvector_op.c         |   10 ++--
src/include/access/gin_private.h            |    2 +-
src/include/c.h                             |    4 +-
src/include/catalog/namespace.h             |    2 +-
src/include/catalog/pg_am.h                 |    4 +-
src/include/catalog/pg_amop.h               |    2 +-
src/include/catalog/pg_amproc.h             |    2 +-
src/include/catalog/pg_attrdef.h            |    2 +-
src/include/catalog/pg_attribute.h          |   14 ++--
src/include/catalog/pg_authid.h             |    2 +-
src/include/catalog/pg_class.h              |    8 +-
src/include/catalog/pg_collation.h          |    2 +-
src/include/catalog/pg_constraint.h         |    6 +-
src/include/catalog/pg_conversion.h         |    4 +-
src/include/catalog/pg_database.h           |    4 +-
src/include/catalog/pg_depend.h             |    4 +-
src/include/catalog/pg_description.h        |    2 +-
src/include/catalog/pg_index.h              |    2 +-
src/include/catalog/pg_inherits.h           |    2 +-
src/include/catalog/pg_largeobject.h        |    2 +-
src/include/catalog/pg_proc.h               |    4 +-
src/include/catalog/pg_rewrite.h            |    2 +-
src/include/catalog/pg_seclabel.h           |    2 +-
src/include/catalog/pg_shdepend.h           |    2 +-
src/include/catalog/pg_statistic.h          |   14 ++--
src/include/catalog/pg_trigger.h            |    4 +-
src/include/catalog/pg_ts_config_map.h      |    4 +-
src/include/catalog/pg_type.h               |    6 +-
src/include/commands/vacuum.h               |    6 +-
src/include/tsearch/ts_public.h             |   10 ++--
src/include/tsearch/ts_type.h               |    6 +-
src/include/tsearch/ts_utils.h              |   20 +++---
src/include/utils/builtins.h                |    2 +-
src/interfaces/ecpg/ecpglib/sqlda.c         |    4 +-
75 files changed, 411 insertions(+), 404 deletions(-)