From 7723fef2646e0670fc782ee5248317bb6d8f9383 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 21 Sep 2010 15:38:41 +0300 Subject: Move expression type enum out of the struct - While legal in C++, the enum and its values are only visible within the scope it was declared in, making it invisible to the rest of the program. --- build/expression.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build/expression.c b/build/expression.c index 3452486ce..72172902f 100644 --- a/build/expression.c +++ b/build/expression.c @@ -26,11 +26,16 @@ #define DEBUG(x) #endif +typedef enum { + VALUE_TYPE_INTEGER, + VALUE_TYPE_STRING, +} valueType; + /** * Encapsulation of a "value" */ typedef struct _value { - enum { VALUE_TYPE_INTEGER, VALUE_TYPE_STRING } type; + valueType type; union { char *s; int i; -- cgit v1.2.3