Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
30be0a87
Commit
30be0a87
authored
Apr 28, 2009
by
kenton@google.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use dll-export declspec on class-nested extensions.
parent
41c3760f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
cpp_extension.cc
src/google/protobuf/compiler/cpp/cpp_extension.cc
+9
-6
No files found.
src/google/protobuf/compiler/cpp/cpp_extension.cc
View file @
30be0a87
...
...
@@ -89,12 +89,15 @@ void ExtensionGenerator::GenerateDeclaration(io::Printer* printer) {
vars
[
"constant_name"
]
=
FieldConstantName
(
descriptor_
);
// If this is a class member, it needs to be declared "static". Otherwise,
// it needs to be "extern".
vars
[
"qualifier"
]
=
(
descriptor_
->
extension_scope
()
==
NULL
)
?
"extern"
:
"static"
;
if
(
!
dllexport_decl_
.
empty
())
{
vars
[
"qualifier"
]
=
dllexport_decl_
+
" "
+
vars
[
"qualifier"
];
// it needs to be "extern". In the latter case, it also needs the DLL
// export/import specifier.
if
(
descriptor_
->
extension_scope
()
==
NULL
)
{
vars
[
"qualifier"
]
=
"extern"
;
if
(
!
dllexport_decl_
.
empty
())
{
vars
[
"qualifier"
]
=
dllexport_decl_
+
" "
+
vars
[
"qualifier"
];
}
}
else
{
vars
[
"qualifier"
]
=
"static"
;
}
printer
->
Print
(
vars
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment