summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChristophe CURIS <christophe.curis@free.fr>2013-05-01 10:39:38 +0200
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-05-31 18:10:02 -0700
commite439f6e7163e3259f11f3363fa319e8a29085a92 (patch)
tree6e882d910e295d327c1a9824ee62c60ba78cd6dd /include
parent01ee6b9c500cd9c67f167e68c8383e8c58db5ddf (diff)
downloadxorg-lib-libXpm-e439f6e7163e3259f11f3363fa319e8a29085a92.tar.gz
Added 'const' attribute to all filename arguments in the API
The filename is always a read-only argument, so it is a good idea to let the caller now about it. This patch does not change active code; the place where the attribute is added will not break source-level compatibility because it adds no restriction on caller side, just adds information; because the lib code behaved the same way it will not break the binary interface either. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'include')
-rw-r--r--include/X11/xpm.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/X11/xpm.h b/include/X11/xpm.h
index 38c62d8..f108f1f 100644
--- a/include/X11/xpm.h
+++ b/include/X11/xpm.h
@@ -304,13 +304,13 @@ _XFUNCPROTOBEGIN
FUNC(XpmReadFileToPixmap, int, (Display *display,
Drawable d,
- char *filename,
+ const char *filename,
Pixmap *pixmap_return,
Pixmap *shapemask_return,
XpmAttributes *attributes));
FUNC(XpmWriteFileFromPixmap, int, (Display *display,
- char *filename,
+ const char *filename,
Pixmap pixmap,
Pixmap shapemask,
XpmAttributes *attributes));
@@ -329,13 +329,13 @@ _XFUNCPROTOBEGIN
XpmAttributes *attributes));
FUNC(XpmReadFileToImage, int, (Display *display,
- char *filename,
+ const char *filename,
XImage **image_return,
XImage **shapeimage_return,
XpmAttributes *attributes));
FUNC(XpmWriteFileFromImage, int, (Display *display,
- char *filename,
+ const char *filename,
XImage *image,
XImage *shapeimage,
XpmAttributes *attributes));
@@ -365,11 +365,11 @@ _XFUNCPROTOBEGIN
Pixmap shapemask,
XpmAttributes *attributes));
#endif
- FUNC(XpmReadFileToBuffer, int, (char *filename, char **buffer_return));
- FUNC(XpmWriteFileFromBuffer, int, (char *filename, char *buffer));
+ FUNC(XpmReadFileToBuffer, int, (const char *filename, char **buffer_return));
+ FUNC(XpmWriteFileFromBuffer, int, (const char *filename, char *buffer));
- FUNC(XpmReadFileToData, int, (char *filename, char ***data_return));
- FUNC(XpmWriteFileFromData, int, (char *filename, char **data));
+ FUNC(XpmReadFileToData, int, (const char *filename, char ***data_return));
+ FUNC(XpmWriteFileFromData, int, (const char *filename, char **data));
FUNC(XpmAttributesSize, int, (void));
FUNC(XpmFreeAttributes, void, (XpmAttributes *attributes));
@@ -382,11 +382,11 @@ _XFUNCPROTOBEGIN
FUNC(XpmLibraryVersion, int, (void));
/* XpmImage functions */
- FUNC(XpmReadFileToXpmImage, int, (char *filename,
+ FUNC(XpmReadFileToXpmImage, int, (const char *filename,
XpmImage *image,
XpmInfo *info));
- FUNC(XpmWriteFileFromXpmImage, int, (char *filename,
+ FUNC(XpmWriteFileFromXpmImage, int, (const char *filename,
XpmImage *image,
XpmInfo *info));
#if !defined(FOR_MSW) && !defined(AMIGA)