Make argument of DohWrite() const.

Writing a buffer to a DOH object doesn't modify so it should be const.

This allows the code using const pointers to pass them to DohWrite() without
neither the casts nor gcc warnings.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12167 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Vadim Zeitlin 2010-07-22 16:59:29 +00:00
commit ac5ddb0315
5 changed files with 5 additions and 5 deletions

View file

@ -67,7 +67,7 @@ static int File_read(DOH *fo, void *buffer, int len) {
* File_write()
* ----------------------------------------------------------------------------- */
static int File_write(DOH *fo, void *buffer, int len) {
static int File_write(DOH *fo, const void *buffer, int len) {
DohFile *f = (DohFile *) ObjData(fo);
if (f->filep) {
int ret = (int) fwrite(buffer, 1, len, f->filep);