Commit 7654f780 authored by Krishna's avatar Krishna

Fixed bugs

parent a761f061
...@@ -360,6 +360,12 @@ string FilenameIdentifier(const string& filename) { ...@@ -360,6 +360,12 @@ string FilenameIdentifier(const string& filename) {
return result; return result;
} }
string GlobalSymbolName(const string& filename, string prefix)
{
return prefix + FilenameIdentifier(filename);
}
// Return the name of the AddDescriptors() function for a given file. // Return the name of the AddDescriptors() function for a given file.
string GlobalAddDescriptorsName(const string& filename) string GlobalAddDescriptorsName(const string& filename)
{ {
...@@ -378,10 +384,6 @@ string GlobalShutdownFileName(const string& filename) ...@@ -378,10 +384,6 @@ string GlobalShutdownFileName(const string& filename)
return GlobalSymbolName(filename,"protobuf_ShutdownFile_"); 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. // Return the qualified C++ name for a file level symbol.
string QualifiedFileLevelSymbol(const string& package, const string& name) { string QualifiedFileLevelSymbol(const string& package, const string& name) {
......
...@@ -581,7 +581,7 @@ void Generator::PrintServiceDescriptor( ...@@ -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_->Print(keyandmodule,"class_name", descriptor.name());
printer_->Indent(); printer_->Indent();
printer_->Print( printer_->Print(
......
...@@ -127,6 +127,7 @@ class LIBPROTOC_EXPORT Generator : public CodeGenerator { ...@@ -127,6 +127,7 @@ class LIBPROTOC_EXPORT Generator : public CodeGenerator {
void PrintServiceDescriptor(const ServiceDescriptor& descriptor) const; void PrintServiceDescriptor(const ServiceDescriptor& descriptor) const;
void PrintServiceClass(const ServiceDescriptor& descriptor) const; void PrintServiceClass(const ServiceDescriptor& descriptor) const;
void PrintServiceStub(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; void PrintEnumValueDescriptor(const EnumValueDescriptor& descriptor) const;
string OptionsValue(const string& class_name, string OptionsValue(const string& class_name,
......
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