summaryrefslogtreecommitdiff
path: root/lib/headerfmt.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-09-21 16:28:34 +0300
committerPanu Matilainen <pmatilai@redhat.com>2010-09-21 16:28:34 +0300
commitb11c895bdd77ec87618079ea5037610e68599e07 (patch)
tree1e429d0aeef9d846af35a95077625d083613ea34 /lib/headerfmt.c
parentaf57879ea050c7258c92a6aef840dd5da51ccbd3 (diff)
downloadrpm-b11c895bdd77ec87618079ea5037610e68599e07.tar.gz
Move PTOK type enum out of the sprintfToken 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.
Diffstat (limited to 'lib/headerfmt.c')
-rw-r--r--lib/headerfmt.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/headerfmt.c b/lib/headerfmt.c
index d2fa30996..e25f13a3c 100644
--- a/lib/headerfmt.c
+++ b/lib/headerfmt.c
@@ -27,17 +27,19 @@ struct sprintfTag_s {
char * type;
};
+typedef enum {
+ PTOK_NONE = 0,
+ PTOK_TAG,
+ PTOK_ARRAY,
+ PTOK_STRING,
+ PTOK_COND
+} ptokType;
+
/** \ingroup header
*/
typedef struct sprintfToken_s * sprintfToken;
struct sprintfToken_s {
- enum {
- PTOK_NONE = 0,
- PTOK_TAG,
- PTOK_ARRAY,
- PTOK_STRING,
- PTOK_COND
- } type;
+ ptokType type;
union {
struct sprintfTag_s tag; /*!< PTOK_TAG */
struct {