Enlightenment CVS committal
Author : ningerso
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_button.c ewl_calendar.c ewl_callback.c ewl_icon.c
ewl_stock.c ewl_stock.h
Log Message:
Add const to some read-only global variables.
Move initialization of a non-zero global to ewl_callback_init.
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_button.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -3 -r1.55 -r1.56
--- ewl_button.c 12 Nov 2007 22:42:21 -0000 1.55
+++ ewl_button.c 6 Dec 2007 03:40:45 -0000 1.56
@@ -7,7 +7,7 @@
#include "ewl_private.h"
#include "ewl_debug.h"
-static Ewl_Stock_Funcs stock_funcs = {
+static const Ewl_Stock_Funcs const stock_funcs = {
EWL_STOCK_LABEL_SET(ewl_button_label_set),
EWL_STOCK_IMAGE_SET(ewl_button_image_set),
NULL
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_calendar.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- ewl_calendar.c 12 Nov 2007 22:42:21 -0000 1.32
+++ ewl_calendar.c 6 Dec 2007 03:40:45 -0000 1.33
@@ -24,11 +24,11 @@
static void ewl_calendar_add_day_labels(Ewl_Calendar *ib);
-static char *months[] = {"January", "February", "March", "April", "May",
- "June", "July", "August", "September", "October",
- "November", "December"};
+static const char * const months[] = {"January", "February", "March", "April",
+ "May", "June", "July", "August", "September",
+ "October", "November", "December"};
-static int mdays[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
+static const int mdays[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
/**
* @return Returns NULL on failure, a new Ewl_Calendar on success
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_callback.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -3 -r1.37 -r1.38
--- ewl_callback.c 3 Dec 2007 05:41:11 -0000 1.37
+++ ewl_callback.c 6 Dec 2007 03:40:45 -0000 1.38
@@ -25,7 +25,7 @@
static int ewl_callback_insert(Ewl_Widget *w, unsigned int t,
Ewl_Callback *cb, unsigned int pos);
-static int callback_type_count = EWL_CALLBACK_MAX + 1;;
+static int callback_type_count;
static int callback_id = 0;
static Ecore_Hash *cb_registration = NULL;
@@ -59,6 +59,7 @@
cb_registration = ecore_hash_new(ewl_callback_hash,
ewl_callback_compare);
+ callback_type_count = EWL_CALLBACK_MAX + 1;
DRETURN_INT(TRUE, DLEVEL_STABLE);
}
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_icon.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -3 -r1.42 -r1.43
--- ewl_icon.c 12 Nov 2007 22:42:22 -0000 1.42
+++ ewl_icon.c 6 Dec 2007 03:40:45 -0000 1.43
@@ -10,7 +10,7 @@
#include "ewl_private.h"
#include "ewl_debug.h"
-static Ewl_Stock_Funcs stock_funcs = {
+static const Ewl_Stock_Funcs const stock_funcs = {
EWL_STOCK_LABEL_SET(ewl_icon_label_set),
EWL_STOCK_IMAGE_SET(ewl_icon_image_set),
NULL
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_stock.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- ewl_stock.c 12 Nov 2007 22:42:22 -0000 1.10
+++ ewl_stock.c 6 Dec 2007 03:40:45 -0000 1.11
@@ -64,7 +64,7 @@
* @brief Sets the given stock functions onto the stock widget
*/
void
-ewl_stock_functions_set(Ewl_Stock *s, Ewl_Stock_Funcs *funcs)
+ewl_stock_functions_set(Ewl_Stock *s, const Ewl_Stock_Funcs * const funcs)
{
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR(s);
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_stock.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- ewl_stock.h 11 Nov 2007 06:07:46 -0000 1.11
+++ ewl_stock.h 6 Dec 2007 03:40:45 -0000 1.12
@@ -88,7 +88,7 @@
{
Ewl_Box box; /**< Inherit from the box for adding
widgets */
Ewl_Stock_Type stock_type; /**< The stock type of the stock */
- Ewl_Stock_Funcs *stock_funcs; /**< The stock functions */
+ const Ewl_Stock_Funcs *stock_funcs; /**< The stock functions */
};
/**
@@ -105,7 +105,7 @@
int ewl_stock_init(Ewl_Stock *s);
-void ewl_stock_functions_set(Ewl_Stock *s, Ewl_Stock_Funcs *funcs);
+void ewl_stock_functions_set(Ewl_Stock *s, const Ewl_Stock_Funcs *
const funcs);
void ewl_stock_type_set(Ewl_Stock *s, Ewl_Stock_Type stock);
Ewl_Stock_Type ewl_stock_type_get(Ewl_Stock *s);
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs