You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-15 01:04:37 +02:00
Add Pack pseudo-type.
Rather than working directly with Buffer types, define a new Pack pseudo-type that represents a Buffer containing a pack. This makes it clearer that a pack is being stored and allows stronger typing.
This commit is contained in:
@ -123,7 +123,7 @@ Render help to a pack
|
||||
static PackWrite *
|
||||
bldHlpRenderHelpAutoCPack(const BldCfg bldCfg, const BldHlp bldHlp)
|
||||
{
|
||||
PackWrite *const pack = pckWriteNewBuf(bufNew(65 * 1024));
|
||||
PackWrite *const pack = pckWriteNewP(.size = 65 * 1024);
|
||||
|
||||
// Command help
|
||||
// -----------------------------------------------------------------------------------------------------------------------------
|
||||
@ -257,7 +257,7 @@ static Buffer *
|
||||
bldHlpRenderHelpAutoCCmp(const BldCfg bldCfg, const BldHlp bldHlp)
|
||||
{
|
||||
// Get pack buffer
|
||||
const Buffer *const packBuf = pckWriteBuf(bldHlpRenderHelpAutoCPack(bldCfg, bldHlp));
|
||||
const Buffer *const packBuf = pckToBuf(pckWriteResult(bldHlpRenderHelpAutoCPack(bldCfg, bldHlp)));
|
||||
Buffer *const result = bufNew(bufSize(packBuf));
|
||||
|
||||
// Open source/destination
|
||||
|
Reference in New Issue
Block a user