Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_button.c ewl_button.h ewl_label.c ewl_label.h Log Message: - make ewl_button and ewl_label take const char * instead of char * =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_button.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- ewl_button.c 11 Oct 2005 20:53:51 -0000 1.11 +++ ewl_button.c 12 Oct 2005 03:53:24 -0000 1.12 @@ -98,7 +98,7 @@ * @brief Change the label of the specified button */ void -ewl_button_label_set(Ewl_Button *b, char *l) +ewl_button_label_set(Ewl_Button *b, const char *l) { Ewl_Widget *w; @@ -129,17 +129,16 @@ * @return A newly allocated copy of the label on the button. * @brief Retrieve the label of the specified button */ -char * +const char * ewl_button_label_get(Ewl_Button *b) { - char *val = NULL; - DENTER_FUNCTION(DLEVEL_STABLE); if (b->label_object) - val = ewl_label_text_get(EWL_LABEL(b->label_object)); + DRETURN_PTR(ewl_label_text_get(EWL_LABEL(b->label_object)), + DLEVEL_STABLE); - DRETURN_PTR(val, DLEVEL_STABLE); + DRETURN_PTR(NULL, DLEVEL_STABLE); } /** =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_button.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- ewl_button.h 11 Oct 2005 20:53:51 -0000 1.5 +++ ewl_button.h 12 Oct 2005 03:53:24 -0000 1.6 @@ -44,8 +44,8 @@ Ewl_Widget *ewl_button_new(void); int ewl_button_init(Ewl_Button *b); -void ewl_button_label_set(Ewl_Button *b, char *l); -char *ewl_button_label_get(Ewl_Button *b); +void ewl_button_label_set(Ewl_Button *b, const char *l); +const char *ewl_button_label_get(Ewl_Button *b); void ewl_button_stock_type_set(Ewl_Button *b, Ewl_Stock_Type stock); Ewl_Stock_Type ewl_button_stock_type_get(Ewl_Button *b); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_label.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- ewl_label.c 6 Oct 2005 05:01:44 -0000 1.10 +++ ewl_label.c 12 Oct 2005 03:53:24 -0000 1.11 @@ -62,7 +62,7 @@ * @brief Sets the given @a text into the widget @a la */ void -ewl_label_text_set(Ewl_Label *la, char *text) +ewl_label_text_set(Ewl_Label *la, const char *text) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR("la", la); @@ -81,7 +81,7 @@ * @return Returns no value. * @brief Gets the current text set into the label */ -char * +const char * ewl_label_text_get(Ewl_Label *la) { DENTER_FUNCTION(DLEVEL_STABLE); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_label.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- ewl_label.h 6 Oct 2005 05:01:44 -0000 1.4 +++ ewl_label.h 12 Oct 2005 03:53:24 -0000 1.5 @@ -34,8 +34,8 @@ Ewl_Widget *ewl_label_new(); int ewl_label_init(Ewl_Label *la); -void ewl_label_text_set(Ewl_Label *la, char *text); -char *ewl_label_text_get(Ewl_Label *la); +void ewl_label_text_set(Ewl_Label *la, const char *text); +const char *ewl_label_text_get(Ewl_Label *la); /* * Internally used callbacks ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs