diff options
| author | Tom Lane | 2022-12-09 15:43:45 +0000 |
|---|---|---|
| committer | Tom Lane | 2022-12-09 15:43:45 +0000 |
| commit | bad5116957eea2dc360c6c233be08284bd3d5364 (patch) | |
| tree | c7cf0fd40fd7e37f6e14ed4a9c883a8b129a32a3 /src/include | |
| parent | ccff2d20ed9622815df2a7deffce8a7b14830965 (diff) | |
Const-ify a couple of datetime parsing subroutines.
More could be done in this line, but I just grabbed some low-hanging
fruit. Principal objective was to remove the need for several ugly
unconstify() usages in formatting.c.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/utils/datetime.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/include/utils/datetime.h b/src/include/utils/datetime.h index 2cae346beb0..934cb56a3a5 100644 --- a/src/include/utils/datetime.h +++ b/src/include/utils/datetime.h @@ -296,7 +296,7 @@ extern int ParseDateTime(const char *timestr, char *workbuf, size_t buflen, extern int DecodeDateTime(char **field, int *ftype, int nf, int *dtype, struct pg_tm *tm, fsec_t *fsec, int *tzp); -extern int DecodeTimezone(char *str, int *tzp); +extern int DecodeTimezone(const char *str, int *tzp); extern int DecodeTimeOnly(char **field, int *ftype, int nf, int *dtype, struct pg_tm *tm, fsec_t *fsec, int *tzp); @@ -322,10 +322,10 @@ extern void EncodeSpecialTimestamp(Timestamp dt, char *str); extern int ValidateDate(int fmask, bool isjulian, bool is2digits, bool bc, struct pg_tm *tm); -extern int DecodeTimezoneAbbrev(int field, char *lowtoken, +extern int DecodeTimezoneAbbrev(int field, const char *lowtoken, int *offset, pg_tz **tz); -extern int DecodeSpecial(int field, char *lowtoken, int *val); -extern int DecodeUnits(int field, char *lowtoken, int *val); +extern int DecodeSpecial(int field, const char *lowtoken, int *val); +extern int DecodeUnits(int field, const char *lowtoken, int *val); extern int j2day(int date); |
