pgsql: Standardize naming of malloc/realloc/strdup wrapper functions.
От | Tom Lane |
---|---|
Тема | pgsql: Standardize naming of malloc/realloc/strdup wrapper functions. |
Дата | |
Msg-id | E1TJ8Gk-0008Nb-M9@gemulon.postgresql.org обсуждение исходный текст |
Список | pgsql-committers |
Standardize naming of malloc/realloc/strdup wrapper functions. We had a number of variants on the theme of "malloc or die", with the majority named like "pg_malloc", but by no means all. Standardize on the names pg_malloc, pg_malloc0, pg_realloc, pg_strdup. Get rid of pg_calloc entirely in favor of using pg_malloc0. This is an essentially cosmetic change, so no back-patch. (I did find a couple of places where psql and pg_dump were using plain malloc or strdup instead of the pg_ versions, but they don't look significant enough to bother back-patching.) Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/a563d941803535dbd27d4191fe7729497b7fdf31 Modified Files -------------- contrib/oid2name/oid2name.c | 42 ++++++++-------- contrib/pgbench/pgbench.c | 58 +++++++++++----------- src/bin/initdb/initdb.c | 82 +++++++++++++++--------------- src/bin/pg_basebackup/pg_basebackup.c | 14 +++--- src/bin/pg_basebackup/pg_receivexlog.c | 8 ++-- src/bin/pg_basebackup/receivelog.c | 2 +- src/bin/pg_basebackup/streamutil.c | 10 ++-- src/bin/pg_basebackup/streamutil.h | 6 +- src/bin/pg_ctl/pg_ctl.c | 35 ++++++-------- src/bin/pg_dump/compress_io.c | 2 +- src/bin/pg_dump/dumpmem.c | 7 +-- src/bin/pg_dump/dumpmem.h | 2 +- src/bin/pg_dump/pg_backup_archiver.c | 22 ++++---- src/bin/pg_dump/pg_backup_custom.c | 6 +- src/bin/pg_dump/pg_backup_directory.c | 6 +- src/bin/pg_dump/pg_backup_tar.c | 10 ++-- src/bin/pg_dump/pg_dump.c | 4 +- src/bin/pg_dump/pg_dump_sort.c | 2 +- src/bin/psql/command.c | 4 +- src/bin/psql/common.c | 18 +------ src/bin/psql/common.h | 3 +- src/bin/psql/copy.c | 2 +- src/bin/psql/describe.c | 8 ++-- src/bin/psql/print.c | 84 ++++++++++---------------------- src/bin/psql/psqlscan.l | 2 +- src/bin/psql/startup.c | 4 +- src/bin/scripts/common.c | 34 ++++++++++--- src/bin/scripts/common.h | 2 + 28 files changed, 223 insertions(+), 256 deletions(-)
В списке pgsql-committers по дате отправления: