Skip to content

Commit

Permalink
Remove _iceS_ static from generated header files in C++ (#2557)
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardnormier authored Jul 24, 2024
1 parent 7ab15ef commit 963c1d0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
29 changes: 0 additions & 29 deletions cpp/src/slice2cpp/Gen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1982,7 +1982,6 @@ Slice::Gen::DataDefVisitor::DataDefVisitor(IceInternal::Output& h, IceInternal::
_dllExport(dllExport),
_dllClassExport(toDllClassExport(dllExport)),
_dllMemberExport(toDllMemberExport(dllExport)),
_doneStaticSymbol(false),
_useWstring(TypeContext::None)
{
}
Expand Down Expand Up @@ -2302,20 +2301,6 @@ Slice::Gen::DataDefVisitor::visitExceptionEnd(const ExceptionPtr& p)

H << eb << ';';

//
// We need an instance here to trigger initialization if the implementation is in a shared library.
// But we do this only once per source file, because a single instance is sufficient to initialize
// all of the globals in a shared library.
//
if (!_doneStaticSymbol)
{
_doneStaticSymbol = true;
H << sp;
H << nl << "/// \\cond INTERNAL";
H << nl << "static " << name << " _iceS_" << p->name() << "_init;";
H << nl << "/// \\endcond";
}

_useWstring = resetUseWstring(_useWstringHist);
}

Expand Down Expand Up @@ -2528,20 +2513,6 @@ Slice::Gen::DataDefVisitor::visitClassDefEnd(const ClassDefPtr& p)

H << eb << ';';

if (!_doneStaticSymbol)
{
//
// We need an instance here to trigger initialization if the implementation is in a static library.
// But we do this only once per source file, because a single instance is sufficient to initialize
// all of the globals in a compilation unit.
//
_doneStaticSymbol = true;
H << sp;
H << nl << "/// \\cond INTERNAL";
H << nl << "static " << fixKwd(p->name()) << " _iceS_" << p->name() << "_init;";
H << nl << "/// \\endcond";
}

_useWstring = resetUseWstring(_useWstringHist);
}

Expand Down
1 change: 0 additions & 1 deletion cpp/src/slice2cpp/Gen.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ namespace Slice
std::string _dllExport;
std::string _dllClassExport;
std::string _dllMemberExport;
bool _doneStaticSymbol;
TypeContext _useWstring;
std::list<TypeContext> _useWstringHist;
};
Expand Down

0 comments on commit 963c1d0

Please sign in to comment.