mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-18 06:03:24 +02:00
3c6f8c011f
pg_strtouint64() is a wrapper around strtoull/strtoul/_strtoui64, but it seems no longer necessary to have this indirection. msvc/Solution.pm claims HAVE_STRTOULL, so the "MSVC only" part seems unnecessary. Also, we have code in c.h to substitute alternatives for strtoull() if not found, and that would appear to cover all currently supported platforms, so having a further fallback in pg_strtouint64() seems unnecessary. Therefore, we could remove pg_strtouint64(), and use strtoull() directly in all call sites. However, it seems useful to keep a separate notation for parsing exactly 64-bit integers, matching the type definition int64/uint64. For that, add new macros strtoi64() and strtou64() in c.h as thin wrappers around strtol()/strtoul() or strtoll()/stroull(). This makes these functions available everywhere instead of just in the server code, and it makes the function naming notably different from the pg_strtointNN() functions in numutils.c, which have a different API. Discussion: https://www.postgresql.org/message-id/flat/a3df47c9-b1b4-29f2-7e91-427baf8b75a3%40enterprisedb.com |
||
---|---|---|
.. | ||
access | ||
bootstrap | ||
catalog | ||
commands | ||
executor | ||
foreign | ||
jit | ||
lib | ||
libpq | ||
main | ||
nodes | ||
optimizer | ||
parser | ||
partitioning | ||
po | ||
port | ||
postmaster | ||
regex | ||
replication | ||
rewrite | ||
snowball | ||
statistics | ||
storage | ||
tcop | ||
tsearch | ||
utils | ||
.gitignore | ||
common.mk | ||
Makefile | ||
nls.mk |