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.
This commit is contained in:
Panu Matilainen 2010-09-21 16:28:34 +03:00
parent af57879ea0
commit b11c895bdd
1 changed files with 9 additions and 7 deletions

View File

@ -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 {