1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-15 01:04:37 +02:00

Remove unused getters in common/io/write module.

These were probably added for symmetry with IoRead but we would prefer to remove those getters.

So, just remove the equivalents in IoWrite.
This commit is contained in:
David Steele
2020-04-01 19:33:11 -04:00
parent f19c59ab38
commit 78beb16d6f
3 changed files with 1 additions and 40 deletions

View File

@ -256,21 +256,6 @@ ioWriteClose(IoWrite *this)
FUNCTION_LOG_RETURN_VOID();
}
/***********************************************************************************************************************************
Interface for the write object
***********************************************************************************************************************************/
void *
ioWriteDriver(IoWrite *this)
{
FUNCTION_TEST_BEGIN();
FUNCTION_TEST_PARAM(IO_WRITE, this);
FUNCTION_TEST_END();
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(this->driver);
}
/***********************************************************************************************************************************
Get/set filters
@ -304,18 +289,3 @@ ioWriteHandle(const IoWrite *this)
FUNCTION_LOG_RETURN(INT, this->interface.handle == NULL ? -1 : this->interface.handle(this->driver));
}
/***********************************************************************************************************************************
Interface for the write object
***********************************************************************************************************************************/
const IoWriteInterface *
ioWriteInterface(const IoWrite *this)
{
FUNCTION_TEST_BEGIN();
FUNCTION_TEST_PARAM(IO_WRITE, this);
FUNCTION_TEST_END();
ASSERT(this != NULL);
FUNCTION_TEST_RETURN(&this->interface);
}

View File

@ -22,12 +22,6 @@ typedef struct IoWriteInterface
IoWrite *ioWriteNew(void *driver, IoWriteInterface interface);
/***********************************************************************************************************************************
Getters
***********************************************************************************************************************************/
void *ioWriteDriver(IoWrite *this);
const IoWriteInterface *ioWriteInterface(const IoWrite *this);
/***********************************************************************************************************************************
Macros for function logging
***********************************************************************************************************************************/

View File

@ -536,10 +536,7 @@ testRun(void)
TEST_ASSIGN(write, ioHandleWriteNew(strNew("write test"), HARNESS_FORK_CHILD_WRITE()), "move write");
ioWriteOpen(write);
TEST_RESULT_INT(
ioWriteHandle(write), ((IoHandleWrite *)ioWriteDriver(write))->handle, "check write handle");
TEST_RESULT_PTR(ioWriteDriver(write), write->driver, "check write driver");
TEST_RESULT_PTR(ioWriteInterface(write), &write->interface, "check write interface");
TEST_RESULT_INT(ioWriteHandle(write), ((IoHandleWrite *)write->driver)->handle, "check write handle");
// Write a line to be read
TEST_RESULT_VOID(ioWriteStrLine(write, strNew("test string 1")), "write test string");