Skip to content

Commit

Permalink
const correctness fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Mar 16, 2002
1 parent bd8818a commit 57a1760
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions archivers/dir.c
Expand Up @@ -18,7 +18,7 @@

static int DIR_read(FileHandle *handle, void *buffer,
unsigned int objSize, unsigned int objCount);
static int DIR_write(FileHandle *handle, void *buffer,
static int DIR_write(FileHandle *handle, const void *buffer,
unsigned int objSize, unsigned int objCount);
static int DIR_eof(FileHandle *handle);
static int DIR_tell(FileHandle *handle);
Expand Down Expand Up @@ -109,7 +109,7 @@ static int DIR_read(FileHandle *handle, void *buffer,
} /* DIR_read */


static int DIR_write(FileHandle *handle, void *buffer,
static int DIR_write(FileHandle *handle, const void *buffer,
unsigned int objSize, unsigned int objCount)
{
FILE *h = (FILE *) (handle->opaque);
Expand Down
6 changes: 3 additions & 3 deletions physfs.c
Expand Up @@ -1230,7 +1230,7 @@ int PHYSFS_close(PHYSFS_file *handle)


int PHYSFS_read(PHYSFS_file *handle, void *buffer,
unsigned int objSize, unsigned int objCount)
unsigned int objSize, unsigned int objCount)
{
FileHandle *h = (FileHandle *) handle->opaque;
assert(h != NULL);
Expand All @@ -1240,8 +1240,8 @@ int PHYSFS_read(PHYSFS_file *handle, void *buffer,
} /* PHYSFS_read */


int PHYSFS_write(PHYSFS_file *handle, void *buffer,
unsigned int objSize, unsigned int objCount)
int PHYSFS_write(PHYSFS_file *handle, const void *buffer,
unsigned int objSize, unsigned int objCount)
{
FileHandle *h = (FileHandle *) handle->opaque;
assert(h != NULL);
Expand Down
4 changes: 2 additions & 2 deletions physfs.h
Expand Up @@ -772,7 +772,7 @@ __EXPORT__ int PHYSFS_read(PHYSFS_file *handle, void *buffer,
* @return number of objects written. PHYSFS_getLastError() can shed light on
* the reason this might be < (objCount). -1 if complete failure.
*/
__EXPORT__ int PHYSFS_write(PHYSFS_file *handle, void *buffer,
__EXPORT__ int PHYSFS_write(PHYSFS_file *handle, const void *buffer,
unsigned int objSize, unsigned int objCount);


Expand Down Expand Up @@ -811,7 +811,7 @@ __EXPORT__ int PHYSFS_seek(PHYSFS_file *handle, int pos);
/**
* Get total length of a file in bytes. Note that if the file size can't
* be determined (since the archive is "streamed" or whatnot) than this
* with report (-1). Also note that if another process/thread is writing
* will report (-1). Also note that if another process/thread is writing
* to this file at the same time, then the information this function
* supplies could be incorrect before you get it. Use with caution, or
* better yet, don't use at all.
Expand Down
2 changes: 1 addition & 1 deletion physfs_internal.h
Expand Up @@ -62,7 +62,7 @@ typedef struct __PHYSFS_FILEFUNCTIONS__
* if complete failure.
* On failure, call __PHYSFS_setError().
*/
int (*write)(FileHandle *handle, void *buffer,
int (*write)(FileHandle *handle, const void *buffer,
unsigned int objSize, unsigned int objCount);

/*
Expand Down

0 comments on commit 57a1760

Please sign in to comment.