Mercurial > pidgin.yaz
changeset 15548:c2d75b47198d
sf patch #1647731, from Markus Elfring
constify some things
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 04 Feb 2007 19:42:39 +0000 |
parents | 6d16b2ef2489 |
children | bcdf8880564b |
files | COPYRIGHT libpurple/circbuffer.c libpurple/circbuffer.h libpurple/whiteboard.c libpurple/whiteboard.h libpurple/xmlnode.c libpurple/xmlnode.h |
diffstat | 7 files changed, 15 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/COPYRIGHT Sun Feb 04 18:33:44 2007 +0000 +++ b/COPYRIGHT Sun Feb 04 19:42:39 2007 +0000 @@ -97,6 +97,7 @@ Andrew Echols John Eckerdal Sean Egan <seanegan@gmail.com> +Markus Elfring Nelson Elhage Ignacio J. Elia Brian Enigma
--- a/libpurple/circbuffer.c Sun Feb 04 18:33:44 2007 +0000 +++ b/libpurple/circbuffer.c Sun Feb 04 19:42:39 2007 +0000 @@ -122,8 +122,8 @@ buf->bufused += len; } -gsize gaim_circ_buffer_get_max_read(GaimCircBuffer *buf) { - int max_read; +gsize gaim_circ_buffer_get_max_read(const GaimCircBuffer *buf) { + gsize max_read; g_return_val_if_fail(buf != NULL, 0);
--- a/libpurple/circbuffer.h Sun Feb 04 18:33:44 2007 +0000 +++ b/libpurple/circbuffer.h Sun Feb 04 19:42:39 2007 +0000 @@ -97,7 +97,7 @@ * * @return the number of bytes that can be read from the GaimCircBuffer */ -gsize gaim_circ_buffer_get_max_read(GaimCircBuffer *buf); +gsize gaim_circ_buffer_get_max_read(const GaimCircBuffer *buf); /** * Mark the number of bytes that have been read from the buffer.
--- a/libpurple/whiteboard.c Sun Feb 04 18:33:44 2007 +0000 +++ b/libpurple/whiteboard.c Sun Feb 04 19:42:39 2007 +0000 @@ -101,9 +101,9 @@ * usernames 'me' and 'who'. Returns a pointer to a matching whiteboard * session; if none match, it returns NULL. */ -GaimWhiteboard *gaim_whiteboard_get_session(GaimAccount *account, const char *who) +GaimWhiteboard *gaim_whiteboard_get_session(const GaimAccount *account, const char *who) { - GaimWhiteboard *wb = NULL; + GaimWhiteboard *wb; GList *l = wbList; @@ -127,7 +127,7 @@ g_list_free(draw_list); } -gboolean gaim_whiteboard_get_dimensions(GaimWhiteboard *wb, int *width, int *height) +gboolean gaim_whiteboard_get_dimensions(const GaimWhiteboard *wb, int *width, int *height) { GaimWhiteboardPrplOps *prpl_ops = wb->prpl_ops; @@ -188,7 +188,7 @@ prpl_ops->set_brush(wb, size, color); } -gboolean gaim_whiteboard_get_brush(GaimWhiteboard *wb, int *size, int *color) +gboolean gaim_whiteboard_get_brush(const GaimWhiteboard *wb, int *size, int *color) { GaimWhiteboardPrplOps *prpl_ops = wb->prpl_ops;
--- a/libpurple/whiteboard.h Sun Feb 04 18:33:44 2007 +0000 +++ b/libpurple/whiteboard.h Sun Feb 04 19:42:39 2007 +0000 @@ -73,9 +73,9 @@ { void (*start)(GaimWhiteboard *wb); /**< start function */ void (*end)(GaimWhiteboard *wb); /**< end function */ - void (*get_dimensions)(GaimWhiteboard *wb, int *width, int *height); /**< get_dimensions function */ + void (*get_dimensions)(const GaimWhiteboard *wb, int *width, int *height); /**< get_dimensions function */ void (*set_dimensions)(GaimWhiteboard *wb, int width, int height); /**< set_dimensions function */ - void (*get_brush) (GaimWhiteboard *wb, int *size, int *color); /**< get the brush size and color */ + void (*get_brush) (const GaimWhiteboard *wb, int *size, int *color); /**< get the brush size and color */ void (*set_brush) (GaimWhiteboard *wb, int size, int color); /**< set the brush size and color */ void (*send_draw_list)(GaimWhiteboard *wb, GList *draw_list); /**< send_draw_list function */ void (*clear)(GaimWhiteboard *wb); /**< clear function */ @@ -138,7 +138,7 @@ * * @return The whiteboard if found, otherwise @c NULL. */ -GaimWhiteboard *gaim_whiteboard_get_session(GaimAccount *account, const char *who); +GaimWhiteboard *gaim_whiteboard_get_session(const GaimAccount *account, const char *who); /** * Destorys a drawing list for a whiteboard @@ -156,7 +156,7 @@ * * @return TRUE if the values of width and height were set. */ -gboolean gaim_whiteboard_get_dimensions(GaimWhiteboard *wb, int *width, int *height); +gboolean gaim_whiteboard_get_dimensions(const GaimWhiteboard *wb, int *width, int *height); /** * Sets the dimensions for a whiteboard. @@ -231,7 +231,7 @@ * * @return TRUE if the size and color were set. */ -gboolean gaim_whiteboard_get_brush(GaimWhiteboard *wb, int *size, int *color); +gboolean gaim_whiteboard_get_brush(const GaimWhiteboard *wb, int *size, int *color); /** * Sets the size and color of the brush.
--- a/libpurple/xmlnode.c Sun Feb 04 18:33:44 2007 +0000 +++ b/libpurple/xmlnode.c Sun Feb 04 19:42:39 2007 +0000 @@ -583,7 +583,7 @@ } xmlnode * -xmlnode_copy(xmlnode *src) +xmlnode_copy(const xmlnode *src) { xmlnode *ret; xmlnode *child;
--- a/libpurple/xmlnode.h Sun Feb 04 18:33:44 2007 +0000 +++ b/libpurple/xmlnode.h Sun Feb 04 19:42:39 2007 +0000 @@ -249,7 +249,7 @@ * * @return A new copy of the src node. */ -xmlnode *xmlnode_copy(xmlnode *src); +xmlnode *xmlnode_copy(const xmlnode *src); /** * Frees a node and all of it's children.