1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-03 00:26:59 +02:00

Add cvtZSubNTo*() functions.

These functions allow conversion from substrings without needing to create a String or a temporary buffer.

httpDateToTime() no longer requires a temp mem context. Also improve handling of month search to avoid an allocation.

httpUriDecode() no longer requires a temp mem context.

jsonReadStr() no longer requires a temp mem context.

pgLsnFromWalSegment() no longer requires a temp mem context.

pgVersionFromStr() no longer requires a temp mem context. Also do a bit of refactoring.

storageGcsCvtTime() no longer leaks six Strings per call.

storageS3CvtTime() no longer leaks six Strings per call.
This commit is contained in:
David Steele
2022-04-28 09:50:23 -04:00
parent 6e18235be8
commit bc46d4e37b
12 changed files with 273 additions and 202 deletions

View File

@ -65,7 +65,7 @@ testBackupValidateCallback(void *callbackData, const StorageInfo *info)
if (bundle)
{
const uint64_t bundleId = cvtZToUInt64(strZ(strSub(info->name, sizeof("bundle"))));
const uint64_t bundleId = cvtZToUInt64(strZ(info->name) + sizeof("bundle"));
for (unsigned int fileIdx = 0; fileIdx < manifestFileTotal(data->manifest); fileIdx++)
{