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 @@ ...@@ -45,12 +45,12 @@
# define PROTOBUF_C__END_DECLS # define PROTOBUF_C__END_DECLS
#endif #endif
#if !defined(PROTOBUF_C_NO_DEPRECATED) #if !defined(PROTOBUF_C__NO_DEPRECATED)
# if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) # if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
# define PROTOBUF_C_DEPRECATED __attribute__((__deprecated__)) # define PROTOBUF_C__DEPRECATED __attribute__((__deprecated__))
# endif # endif
#else #else
# define PROTOBUF_C_DEPRECATED # define PROTOBUF_C__DEPRECATED
#endif #endif
#if defined(_WIN32) && defined(PROTOBUF_C_USE_SHARED_LIB) #if defined(_WIN32) && defined(PROTOBUF_C_USE_SHARED_LIB)
......
...@@ -225,8 +225,8 @@ void FileGenerator::GenerateSource(io::Printer* printer) { ...@@ -225,8 +225,8 @@ void FileGenerator::GenerateSource(io::Printer* printer) {
"/* Generated from: $filename$ */\n" "/* Generated from: $filename$ */\n"
"\n" "\n"
"/* Do not generate deprecated warnings for self */\n" "/* Do not generate deprecated warnings for self */\n"
"#ifndef PROTOBUF_C_NO_DEPRECATED\n" "#ifndef PROTOBUF_C__NO_DEPRECATED\n"
"#define PROTOBUF_C_NO_DEPRECATED\n" "#define PROTOBUF_C__NO_DEPRECATED\n"
"#endif\n" "#endif\n"
"\n" "\n"
"#include \"$basename$.pb-c.h\"\n", "#include \"$basename$.pb-c.h\"\n",
......
...@@ -288,7 +288,7 @@ string FieldName(const FieldDescriptor* field) { ...@@ -288,7 +288,7 @@ string FieldName(const FieldDescriptor* field) {
string FieldDeprecated(const FieldDescriptor* field) { string FieldDeprecated(const FieldDescriptor* field) {
if (field->options().deprecated()) { if (field->options().deprecated()) {
return " PROTOBUF_C_DEPRECATED"; return " PROTOBUF_C__DEPRECATED";
} }
return ""; 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