[evolution-data-server/gnome-3-16] Bug 752233 - sexp: Eliminate some global variables which broke static linking



commit 70dbe26012542e171fd6292b50c7177104b926ea
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Fri Jul 10 17:40:31 2015 +0100

    Bug 752233 - sexp: Eliminate some global variables which broke static linking
    
    Compiling EDS with --disable-shared was broken due to several global
    variables being declared with the same names, and not being declared
    static. Fix that by eliminating the unused ones and making the rest
    static.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=752233

 camel/camel-sexp.c      |    6 +-----
 libedataserver/e-sexp.c |    6 +-----
 2 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/camel/camel-sexp.c b/camel/camel-sexp.c
index 1150a2c..cc659f1 100644
--- a/camel/camel-sexp.c
+++ b/camel/camel-sexp.c
@@ -908,7 +908,7 @@ parse_dump_term (CamelSExpTerm *term,
 }
 #endif
 
-const gchar *time_functions[] = {
+static const gchar *time_functions[] = {
        "time-now",
        "make-time",
        "time-add-day",
@@ -978,8 +978,6 @@ static const struct {
        {"completed-before?", unary_generator},
 };
 
-const gint generators_count = sizeof (generators) / sizeof (generators[0]);
-
 static gboolean
 or_operator (gint argc,
              CamelSExpResult **argv,
@@ -1062,8 +1060,6 @@ static const struct {
        {"and", and_operator}
 };
 
-const gint operators_count = sizeof (operators) / sizeof (operators[0]);
-
 static CamelSOperatorFunc *
 get_operator_function (const gchar *fname)
 {
diff --git a/libedataserver/e-sexp.c b/libedataserver/e-sexp.c
index 0f9764c..313c74b 100644
--- a/libedataserver/e-sexp.c
+++ b/libedataserver/e-sexp.c
@@ -883,7 +883,7 @@ parse_dump_term (struct _ESExpTerm *t,
 }
 #endif
 
-const gchar *time_functions[] = {
+static const gchar *time_functions[] = {
        "time-now",
        "make-time",
        "time-add-day",
@@ -953,8 +953,6 @@ static const struct {
        {"completed-before?", unary_generator},
 };
 
-const gint generators_count = sizeof (generators) / sizeof (generators[0]);
-
 static gboolean
 or_operator (gint argc,
              struct _ESExpResult **argv,
@@ -1037,8 +1035,6 @@ static const struct {
        {"and", and_operator}
 };
 
-const gint operators_count = sizeof (operators) / sizeof (operators[0]);
-
 static ESOperatorFunc *
 get_operator_function (const gchar *fname)
 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]