Unverified Commit 5bc250b0 authored by Joshua Haberman's avatar Joshua Haberman Committed by GitHub

Merge pull request #5878 from Parad0X/fix-ns

Fix scope resolution for Google namespace
parents 7e276a32 c4e84ae8
...@@ -68,9 +68,9 @@ end ...@@ -68,9 +68,9 @@ end
module A module A
module B module B
module C module C
TestMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage").msgclass TestMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage").msgclass
TestMessage::NestedMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage.NestedMessage").msgclass TestMessage::NestedMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage.NestedMessage").msgclass
TestEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestEnum").enummodule TestEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestEnum").enummodule
end end
end end
end end
...@@ -69,9 +69,9 @@ end ...@@ -69,9 +69,9 @@ end
module A module A
module B module B
module C module C
TestMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage").msgclass TestMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage").msgclass
TestMessage::NestedMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage.NestedMessage").msgclass TestMessage::NestedMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestMessage.NestedMessage").msgclass
TestEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestEnum").enummodule TestEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("A.B.C.TestEnum").enummodule
end end
end end
end end
...@@ -14,7 +14,7 @@ end ...@@ -14,7 +14,7 @@ end
module AA module AA
module BB module BB
module CC module CC
Four = Google::Protobuf::DescriptorPool.generated_pool.lookup("one.two.a_three.and.Four").msgclass Four = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("one.two.a_three.and.Four").msgclass
end end
end end
end end
...@@ -14,7 +14,7 @@ end ...@@ -14,7 +14,7 @@ end
module A module A
module B module B
module C module C
Four = Google::Protobuf::DescriptorPool.generated_pool.lookup("one.two.a_three.Four").msgclass Four = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("one.two.a_three.Four").msgclass
end end
end end
end end
...@@ -14,7 +14,7 @@ end ...@@ -14,7 +14,7 @@ end
module One module One
module Two module Two
module AThree module AThree
Four = Google::Protobuf::DescriptorPool.generated_pool.lookup("one.two.a_three.Four").msgclass Four = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("one.two.a_three.Four").msgclass
end end
end end
end end
...@@ -371,7 +371,7 @@ void GenerateMessageAssignment(const std::string& prefix, ...@@ -371,7 +371,7 @@ void GenerateMessageAssignment(const std::string& prefix,
"prefix", prefix, "prefix", prefix,
"name", RubifyConstant(message->name())); "name", RubifyConstant(message->name()));
printer->Print( printer->Print(
"Google::Protobuf::DescriptorPool.generated_pool." "::Google::Protobuf::DescriptorPool.generated_pool."
"lookup(\"$full_name$\").msgclass\n", "lookup(\"$full_name$\").msgclass\n",
"full_name", message->full_name()); "full_name", message->full_name());
...@@ -391,7 +391,7 @@ void GenerateEnumAssignment(const std::string& prefix, const EnumDescriptor* en, ...@@ -391,7 +391,7 @@ void GenerateEnumAssignment(const std::string& prefix, const EnumDescriptor* en,
"prefix", prefix, "prefix", prefix,
"name", RubifyConstant(en->name())); "name", RubifyConstant(en->name()));
printer->Print( printer->Print(
"Google::Protobuf::DescriptorPool.generated_pool." "::Google::Protobuf::DescriptorPool.generated_pool."
"lookup(\"$full_name$\").enummodule\n", "lookup(\"$full_name$\").enummodule\n",
"full_name", en->full_name()); "full_name", en->full_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