Commit 30be0a87 authored by kenton@google.com's avatar kenton@google.com

Don't use dll-export declspec on class-nested extensions.

parent 41c3760f
...@@ -89,12 +89,15 @@ void ExtensionGenerator::GenerateDeclaration(io::Printer* printer) { ...@@ -89,12 +89,15 @@ void ExtensionGenerator::GenerateDeclaration(io::Printer* printer) {
vars["constant_name"] = FieldConstantName(descriptor_); vars["constant_name"] = FieldConstantName(descriptor_);
// If this is a class member, it needs to be declared "static". Otherwise, // If this is a class member, it needs to be declared "static". Otherwise,
// it needs to be "extern". // it needs to be "extern". In the latter case, it also needs the DLL
vars["qualifier"] = // export/import specifier.
(descriptor_->extension_scope() == NULL) ? "extern" : "static"; if (descriptor_->extension_scope() == NULL) {
vars["qualifier"] = "extern";
if (!dllexport_decl_.empty()) { if (!dllexport_decl_.empty()) {
vars["qualifier"] = dllexport_decl_ + " " + vars["qualifier"]; vars["qualifier"] = dllexport_decl_ + " " + vars["qualifier"];
}
} else {
vars["qualifier"] = "static";
} }
printer->Print(vars, printer->Print(vars,
......
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