mirror of
https://github.com/protobuf-c/protobuf-c.git
synced 2024-12-28 06:10:53 +08:00
PROTOBUF_C_{BEGIN,END}_DECLS -> PROTOBUF_C__{BEGIN,END}_DECLS
these identifiers aren't intended for use by client code. add a double underscore to indicate this.
This commit is contained in:
parent
94e7cde263
commit
af5120e678
@ -38,11 +38,11 @@
|
||||
#include <limits.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
# define PROTOBUF_C_BEGIN_DECLS extern "C" {
|
||||
# define PROTOBUF_C_END_DECLS }
|
||||
# define PROTOBUF_C__BEGIN_DECLS extern "C" {
|
||||
# define PROTOBUF_C__END_DECLS }
|
||||
#else
|
||||
# define PROTOBUF_C_BEGIN_DECLS
|
||||
# define PROTOBUF_C_END_DECLS
|
||||
# define PROTOBUF_C__BEGIN_DECLS
|
||||
# define PROTOBUF_C__END_DECLS
|
||||
#endif
|
||||
|
||||
#if !defined(PROTOBUF_C_NO_DEPRECATED)
|
||||
@ -63,7 +63,7 @@
|
||||
# define PROTOBUF_C_API
|
||||
#endif
|
||||
|
||||
PROTOBUF_C_BEGIN_DECLS
|
||||
PROTOBUF_C__BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* Get the version of the protobuf-c library. Note that this is the version of
|
||||
@ -578,6 +578,6 @@ protobuf_c_service_invoke_internal(
|
||||
ProtobufCClosure closure,
|
||||
void *closure_data);
|
||||
|
||||
PROTOBUF_C_END_DECLS
|
||||
PROTOBUF_C__END_DECLS
|
||||
|
||||
#endif /* PROTOBUF_C_H */
|
||||
|
@ -131,7 +131,7 @@ void FileGenerator::GenerateHeader(io::Printer* printer) {
|
||||
"\n"
|
||||
"#include <protobuf-c/protobuf-c.h>\n"
|
||||
"\n"
|
||||
"PROTOBUF_C_BEGIN_DECLS\n"
|
||||
"PROTOBUF_C__BEGIN_DECLS\n"
|
||||
"\n",
|
||||
"filename", file_->name(),
|
||||
"filename_identifier", filename_identifier);
|
||||
@ -214,7 +214,7 @@ void FileGenerator::GenerateHeader(io::Printer* printer) {
|
||||
|
||||
printer->Print(
|
||||
"\n"
|
||||
"PROTOBUF_C_END_DECLS\n"
|
||||
"PROTOBUF_C__END_DECLS\n"
|
||||
"\n\n#endif /* PROTOBUF_C_$filename_identifier$__INCLUDED */\n",
|
||||
"filename_identifier", filename_identifier);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user