mirror of
https://github.com/postgres/postgres.git
synced 2025-10-28 11:55:03 +03:00
Move scanint8() to numutils.c
Move scanint8() to numutils.c and rename to pg_strtoint64(). We already have a "16" and "32" version of that, and the code inside the functions was aligned, so this move makes all three versions consistent. The API is also changed to no longer provide the errorOK case. Users that need the error checking can use strtoi64(). Reviewed-by: John Naylor <john.naylor@enterprisedb.com> Discussion: https://www.postgresql.org/message-id/flat/b239564c-cad0-b23e-c57e-166d883cb97d@enterprisedb.com
This commit is contained in:
@@ -787,8 +787,8 @@ is_an_int(const char *str)
|
||||
/*
|
||||
* strtoint64 -- convert a string to 64-bit integer
|
||||
*
|
||||
* This function is a slightly modified version of scanint8() from
|
||||
* src/backend/utils/adt/int8.c.
|
||||
* This function is a slightly modified version of pg_strtoint64() from
|
||||
* src/backend/utils/adt/numutils.c.
|
||||
*
|
||||
* The function returns whether the conversion worked, and if so
|
||||
* "*result" is set to the result.
|
||||
|
||||
Reference in New Issue
Block a user