mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-14 10:13:05 +02:00
4815752ccc
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.
23 lines
633 B
Plaintext
23 lines
633 B
Plaintext
# ----------------------------------------------------------------------------------------------------------------------------------
|
|
# Page Checksum Perl Exports
|
|
# ----------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
MODULE = pgBackRest::LibC PACKAGE = pgBackRest::LibC
|
|
|
|
U16
|
|
pageChecksum(page, blockNo, pageSize)
|
|
const char *page
|
|
U32 blockNo
|
|
U32 pageSize
|
|
CODE:
|
|
RETVAL = 0;
|
|
|
|
ERROR_XS_BEGIN()
|
|
{
|
|
RETVAL = pageChecksum(
|
|
(const unsigned char *)page, blockNo, pageSize);
|
|
}
|
|
ERROR_XS_END();
|
|
OUTPUT:
|
|
RETVAL
|