From a214b5227f872fc4e733b9a570ebc8973b244b0d Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Mon, 11 Jul 2011 11:07:00 +0200 Subject: Drop stringified parameter in MUMBLE_MSG macros Use #foo instead to stringify. --- src/cmumble.h | 2 +- src/gen_message.sh | 2 +- src/messages.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cmumble.h b/src/cmumble.h index baab8f3..f7db59c 100644 --- a/src/cmumble.h +++ b/src/cmumble.h @@ -56,7 +56,7 @@ enum udp_message_type { }; enum mumble_message { -#define MUMBLE_MSG(a,b,c) a, +#define MUMBLE_MSG(a,b) a, MUMBLE_MSGS #undef MUMBLE_MSG }; diff --git a/src/gen_message.sh b/src/gen_message.sh index 32ef978..147e8a6 100755 --- a/src/gen_message.sh +++ b/src/gen_message.sh @@ -5,7 +5,7 @@ echo "#define MUMBLE_MSGS \\" while read message do prefixed_lower_name=$(echo "$message" | sed "s/\(^\|[a-z]\)\([A-Z][A-Z]*\)/\1_\L\2/g") - echo -e "\tMUMBLE_MSG(${message}, ${prefixed_lower_name}, \"${message}\") \\" + echo -e "\tMUMBLE_MSG(${message}, ${prefixed_lower_name}) \\" done echo echo "#endif" diff --git a/src/messages.c b/src/messages.c index a5f2f6f..512839b 100644 --- a/src/messages.c +++ b/src/messages.c @@ -8,7 +8,7 @@ static const struct { const ProtobufCMessageDescriptor *descriptor; const char *name; } messages[] = { -#define MUMBLE_MSG(a,b,c) { &mumble_proto_##b##__descriptor, c }, +#define MUMBLE_MSG(a,b) { &mumble_proto_##b##__descriptor, #a }, MUMBLE_MSGS #undef MUMBLE_MSG }; -- cgit