Commit 8655ca07 authored by Robert Edmonds's avatar Robert Edmonds

PROTOBUF_C_{NO_,}DEPRECATED -> PROTOBUF_C__{NO_,}DEPRECATED

these identifiers aren't intended for use by client code. add a double
underscore to indicate this.
parent d05795c3
......@@ -45,12 +45,12 @@
# define PROTOBUF_C__END_DECLS
#endif
#if !defined(PROTOBUF_C_NO_DEPRECATED)
#if !defined(PROTOBUF_C__NO_DEPRECATED)
# if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
# define PROTOBUF_C_DEPRECATED __attribute__((__deprecated__))
# define PROTOBUF_C__DEPRECATED __attribute__((__deprecated__))
# endif
#else
# define PROTOBUF_C_DEPRECATED
# define PROTOBUF_C__DEPRECATED
#endif
#if defined(_WIN32) && defined(PROTOBUF_C_USE_SHARED_LIB)
......
......@@ -225,8 +225,8 @@ void FileGenerator::GenerateSource(io::Printer* printer) {
"/* Generated from: $filename$ */\n"
"\n"
"/* Do not generate deprecated warnings for self */\n"
"#ifndef PROTOBUF_C_NO_DEPRECATED\n"
"#define PROTOBUF_C_NO_DEPRECATED\n"
"#ifndef PROTOBUF_C__NO_DEPRECATED\n"
"#define PROTOBUF_C__NO_DEPRECATED\n"
"#endif\n"
"\n"
"#include \"$basename$.pb-c.h\"\n",
......
......@@ -288,7 +288,7 @@ string FieldName(const FieldDescriptor* field) {
string FieldDeprecated(const FieldDescriptor* field) {
if (field->options().deprecated()) {
return " PROTOBUF_C_DEPRECATED";
return " PROTOBUF_C__DEPRECATED";
}
return "";
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment