[PATCH 0 of 2] [CU] Some cleanups to libcmpiutil

# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1202512515 28800 # Node ID 79271d1d325748849dc312a51053ef680eb98b86 # Parent cc846858f60cb7ce5b859015c9a120d784074eed [CU] Rename symbol in EO MOF parser to avoid conflict with CLASSNAME() Signed-off-by: Dan Smith <danms@us.ibm.com> diff -r cc846858f60c -r 79271d1d3257 eo_util_lexer.l --- a/eo_util_lexer.l Wed Feb 06 08:27:12 2008 -0800 +++ b/eo_util_lexer.l Fri Feb 08 15:15:15 2008 -0800 @@ -90,7 +90,7 @@ FALSE { <READCLASSNAME>[A-Za-z][A-Za-z0-9_]* { BEGIN INITIAL; /* Go back to normal parsing rules now */ eo_parse_lval.string = (char *)strdup(eo_parse_text); - return(CLASSNAME); + return(CLASS); } /* Propertyname */ diff -r cc846858f60c -r 79271d1d3257 eo_util_parser.y --- a/eo_util_parser.y Wed Feb 06 08:27:12 2008 -0800 +++ b/eo_util_parser.y Fri Feb 08 15:15:15 2008 -0800 @@ -51,7 +51,7 @@ int eo_parse_parseinstance(const CMPIBro %token INSTANCE OF ENDOFFILE /* Define lexical tokens that return a value and their return type */ -%token <string> CLASSNAME +%token <string> CLASS %token <string> PROPERTYNAME %token <string> STRING %token <boolean> BOOLEAN @@ -62,7 +62,7 @@ int eo_parse_parseinstance(const CMPIBro /* Rules section */ instance: /* empty */ - | INSTANCE OF CLASSNAME '{' + | INSTANCE OF CLASS '{' { EOTRACE("classname = %s\n",$3); CMPIObjectPath *op;

# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1202512525 28800 # Node ID 2337330e5a9bc8e71afd04627166155a33dc53f2 # Parent 79271d1d325748849dc312a51053ef680eb98b86 [CU] Rename STRING() macro in libcmpiutil We really shouldn't define a macro with such a blatantly common name. I don't think this actually got used anywhere, but I think it's worth keeping (under a reasonable name) Signed-off-by: Dan Smith <danms@us.ibm.com> diff -r 79271d1d3257 -r 2337330e5a9b libcmpiutil.h --- a/libcmpiutil.h Fri Feb 08 15:15:15 2008 -0800 +++ b/libcmpiutil.h Fri Feb 08 15:15:25 2008 -0800 @@ -44,15 +44,16 @@ #define STREQ(a, b) (strcmp(a, b) == 0) #define STREQC(a, b) (strcasecmp(a, b) == 0) -#define _STRINGIFY(x) #x -#define STRING(x) _STRINGIFY(x) +#define _CU_STRINGIFY(x) #x +#define CU_STRINGIFY(x) _CU_STRINGIFY(x) /** * Dispatch macro for debug_print, fills in the function name and line number * of caller. */ -#define CU_DEBUG(fmt, args...) {debug_print(__FILE__ "(" STRING(__LINE__)"): " \ - fmt "\n", ##args);} +#define CU_DEBUG(fmt, args...) { \ + debug_print(__FILE__ "(" CU_STRINGIFY(__LINE__)"): " \ + fmt "\n", ##args);} /** * Helper for DEBUG macro. Checks environmental variable CU_DEBUG and:
participants (2)
-
Dan Smith
-
Kaitlin Rupert