aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf
diff options
context:
space:
mode:
authorKrishna <krishna.nm86@gmail.com>2014-12-10 21:02:12 +0100
committerKrishna <krishna.nm86@gmail.com>2014-12-10 21:02:12 +0100
commit7654f78029030238c6dff3826671393f4e6db359 (patch)
tree2c9964361cbac23d8b05ce5554b2fcbf4bb10d88 /src/google/protobuf
parenta761f061f4cc0e50324261cc1eb12526ae8783e3 (diff)
downloadprotobuf-7654f78029030238c6dff3826671393f4e6db359.tar.gz
protobuf-7654f78029030238c6dff3826671393f4e6db359.tar.bz2
protobuf-7654f78029030238c6dff3826671393f4e6db359.zip
Fixed bugs
Diffstat (limited to 'src/google/protobuf')
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_helpers.cc10
-rw-r--r--src/google/protobuf/compiler/python/python_generator.cc2
-rw-r--r--src/google/protobuf/compiler/python/python_generator.h1
3 files changed, 8 insertions, 5 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_helpers.cc b/src/google/protobuf/compiler/cpp/cpp_helpers.cc
index e293b413..cd8364f5 100644
--- a/src/google/protobuf/compiler/cpp/cpp_helpers.cc
+++ b/src/google/protobuf/compiler/cpp/cpp_helpers.cc
@@ -360,6 +360,12 @@ string FilenameIdentifier(const string& filename) {
return result;
}
+
+string GlobalSymbolName(const string& filename, string prefix)
+{
+ return prefix + FilenameIdentifier(filename);
+}
+
// Return the name of the AddDescriptors() function for a given file.
string GlobalAddDescriptorsName(const string& filename)
{
@@ -378,10 +384,6 @@ string GlobalShutdownFileName(const string& filename)
return GlobalSymbolName(filename,"protobuf_ShutdownFile_");
}
-string GlobalSymbolName(const string& filename, string prefix)
-{
- return prefix + FilenameIdentifier(filename);
-}
// Return the qualified C++ name for a file level symbol.
string QualifiedFileLevelSymbol(const string& package, const string& name) {
diff --git a/src/google/protobuf/compiler/python/python_generator.cc b/src/google/protobuf/compiler/python/python_generator.cc
index 508cab0d..e4b73f94 100644
--- a/src/google/protobuf/compiler/python/python_generator.cc
+++ b/src/google/protobuf/compiler/python/python_generator.cc
@@ -581,7 +581,7 @@ void Generator::PrintServiceDescriptor(
}
-void Generator::PrintDescriptorKeyAndModuleName(const ServiceDescriptor& descriptor, string keyandmodule) {
+void Generator::PrintDescriptorKeyAndModuleName(const ServiceDescriptor& descriptor, const char* keyandmodule) const {
printer_->Print(keyandmodule,"class_name", descriptor.name());
printer_->Indent();
printer_->Print(
diff --git a/src/google/protobuf/compiler/python/python_generator.h b/src/google/protobuf/compiler/python/python_generator.h
index 7e8f58e5..6b8b76f3 100644
--- a/src/google/protobuf/compiler/python/python_generator.h
+++ b/src/google/protobuf/compiler/python/python_generator.h
@@ -127,6 +127,7 @@ class LIBPROTOC_EXPORT Generator : public CodeGenerator {
void PrintServiceDescriptor(const ServiceDescriptor& descriptor) const;
void PrintServiceClass(const ServiceDescriptor& descriptor) const;
void PrintServiceStub(const ServiceDescriptor& descriptor) const;
+ void PrintDescriptorKeyAndModuleName(const ServiceDescriptor& descriptor, const char* keyandmodule) const ;
void PrintEnumValueDescriptor(const EnumValueDescriptor& descriptor) const;
string OptionsValue(const string& class_name,