You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-15 01:04:37 +02:00
Add Perl interface to C storage layer.
Maintaining the storage layer/drivers in two languages is burdensome. Since the integration tests require the Perl storage layer/drivers we'll need them even after the core code is migrated to C. Create an interface layer so the Perl code can be removed and new storage drivers/features introduced without adding Perl equivalents. The goal is to move the integration tests to C so this interface will eventually be removed. That being the case, the interface was designed for maximum compatibility to ease the transition. The result looks a bit hacky but we'll improve it as needed until it can be retired.
This commit is contained in:
@ -20,42 +20,3 @@ CODE:
|
||||
ERROR_XS_END();
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
bool
|
||||
pageChecksumTest(page, blockNo, pageSize, ignoreWalId, ignoreWalOffset)
|
||||
const char *page
|
||||
U32 blockNo
|
||||
U32 pageSize
|
||||
U32 ignoreWalId
|
||||
U32 ignoreWalOffset
|
||||
CODE:
|
||||
RETVAL = false;
|
||||
|
||||
ERROR_XS_BEGIN()
|
||||
{
|
||||
RETVAL = pageChecksumTest(
|
||||
(const unsigned char *)page, blockNo, pageSize, ignoreWalId, ignoreWalOffset);
|
||||
}
|
||||
ERROR_XS_END();
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
bool
|
||||
pageChecksumBufferTest(pageBuffer, pageBufferSize, blockNoBegin, pageSize, ignoreWalId, ignoreWalOffset)
|
||||
const char *pageBuffer
|
||||
U32 pageBufferSize
|
||||
U32 blockNoBegin
|
||||
U32 pageSize
|
||||
U32 ignoreWalId
|
||||
U32 ignoreWalOffset
|
||||
CODE:
|
||||
RETVAL = false;
|
||||
|
||||
ERROR_XS_BEGIN()
|
||||
{
|
||||
RETVAL = pageChecksumBufferTest(
|
||||
(const unsigned char *)pageBuffer, pageBufferSize, blockNoBegin, pageSize, ignoreWalId, ignoreWalOffset);
|
||||
}
|
||||
ERROR_XS_END();
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
Reference in New Issue
Block a user