# HG changeset patch # User Mark Doliner # Date 1170618159 0 # Node ID c2d75b47198d114643306db0dda359695dff1689 # Parent 6d16b2ef2489e074399ef69a0ea6fdc4d5fe64a5 sf patch #1647731, from Markus Elfring constify some things diff -r 6d16b2ef2489 -r c2d75b47198d COPYRIGHT --- 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 +Markus Elfring Nelson Elhage Ignacio J. Elia Brian Enigma diff -r 6d16b2ef2489 -r c2d75b47198d libpurple/circbuffer.c --- 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); diff -r 6d16b2ef2489 -r c2d75b47198d libpurple/circbuffer.h --- 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. diff -r 6d16b2ef2489 -r c2d75b47198d libpurple/whiteboard.c --- 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; diff -r 6d16b2ef2489 -r c2d75b47198d libpurple/whiteboard.h --- 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. diff -r 6d16b2ef2489 -r c2d75b47198d libpurple/xmlnode.c --- 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; diff -r 6d16b2ef2489 -r c2d75b47198d libpurple/xmlnode.h --- 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.