diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-09-21 15:38:41 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-09-21 15:38:41 +0300 |
commit | 7723fef2646e0670fc782ee5248317bb6d8f9383 (patch) | |
tree | 7601312e258f01d00b00eb8cadcc97dadc87137a | |
parent | 4b06c4995d6acc8352224618361c4b773b3a70a7 (diff) | |
download | librpm-tizen-7723fef2646e0670fc782ee5248317bb6d8f9383.tar.gz librpm-tizen-7723fef2646e0670fc782ee5248317bb6d8f9383.tar.bz2 librpm-tizen-7723fef2646e0670fc782ee5248317bb6d8f9383.zip |
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.
-rw-r--r-- | build/expression.c | 7 |
1 files changed, 6 insertions, 1 deletions
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; |