@@ -220,7 +220,7 @@ struct LogicalTapeSet
220
220
};
221
221
222
222
static LogicalTape * ltsCreateTape (LogicalTapeSet * lts );
223
- static void ltsWriteBlock (LogicalTapeSet * lts , long blocknum , void * buffer );
223
+ static void ltsWriteBlock (LogicalTapeSet * lts , long blocknum , const void * buffer );
224
224
static void ltsReadBlock (LogicalTapeSet * lts , long blocknum , void * buffer );
225
225
static long ltsGetBlock (LogicalTapeSet * lts , LogicalTape * lt );
226
226
static long ltsGetFreeBlock (LogicalTapeSet * lts );
@@ -235,7 +235,7 @@ static void ltsInitReadBuffer(LogicalTape *lt);
235
235
* No need for an error return convention; we ereport() on any error.
236
236
*/
237
237
static void
238
- ltsWriteBlock (LogicalTapeSet * lts , long blocknum , void * buffer )
238
+ ltsWriteBlock (LogicalTapeSet * lts , long blocknum , const void * buffer )
239
239
{
240
240
/*
241
241
* BufFile does not support "holes", so if we're about to write a block
@@ -759,7 +759,7 @@ LogicalTapeSetForgetFreeSpace(LogicalTapeSet *lts)
759
759
* There are no error returns; we ereport() on failure.
760
760
*/
761
761
void
762
- LogicalTapeWrite (LogicalTape * lt , void * ptr , size_t size )
762
+ LogicalTapeWrite (LogicalTape * lt , const void * ptr , size_t size )
763
763
{
764
764
LogicalTapeSet * lts = lt -> tapeSet ;
765
765
size_t nthistime ;
@@ -826,7 +826,7 @@ LogicalTapeWrite(LogicalTape *lt, void *ptr, size_t size)
826
826
lt -> pos += nthistime ;
827
827
if (lt -> nbytes < lt -> pos )
828
828
lt -> nbytes = lt -> pos ;
829
- ptr = (char * ) ptr + nthistime ;
829
+ ptr = (const char * ) ptr + nthistime ;
830
830
size -= nthistime ;
831
831
}
832
832
}
0 commit comments