mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-14 10:13:05 +02:00
8c712d89eb
The function pointer casting used when creating drivers made changing interfaces difficult and led to slightly divergent driver implementations. Unit testing caught production-level errors but there were a lot of small issues and the process was harder than it should have been. Use void pointers instead so that no casts are required. Introduce the THIS_VOID and THIS() macros to make dealing with void pointers a little safer. Since we don't want to expose void pointers in header files, driver functions have been removed from the headers and the various driver objects return their interface type. This cuts down on accessor methods and the vast majority of those functions were not being used. Move functions that are still required to .intern.h. Remove the special "C" crypto functions that were used in libc and instead use the standard interface.
21 lines
860 B
Plaintext
21 lines
860 B
Plaintext
# ----------------------------------------------------------------------------------------------------------------------------------
|
|
# Storage Exports
|
|
# ----------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
MODULE = pgBackRest::LibC PACKAGE = pgBackRest::LibC
|
|
|
|
####################################################################################################################################
|
|
void
|
|
storageDriverPosixPathRemove(path, errorOnMissing, recurse)
|
|
const char *path
|
|
bool errorOnMissing
|
|
bool recurse
|
|
CODE:
|
|
MEM_CONTEXT_XS_TEMP_BEGIN()
|
|
{
|
|
storagePathRemoveP(
|
|
storageDriverPosixNew(strNew("/"), 0640, 750, true, NULL), strNew(path), .errorOnMissing = errorOnMissing,
|
|
.recurse = recurse);
|
|
}
|
|
MEM_CONTEXT_XS_TEMP_END();
|