mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 11:16:55 +00:00
Make static variables used in DocBook output thread-safe.
This commit is contained in:
parent
de3daf040b
commit
452a7a500c
@ -26,6 +26,7 @@
|
|||||||
#include "support/docstream.h"
|
#include "support/docstream.h"
|
||||||
#include "support/lstrings.h"
|
#include "support/lstrings.h"
|
||||||
#include "support/textutils.h"
|
#include "support/textutils.h"
|
||||||
|
#include "support/ThreadStorage.h"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
@ -135,10 +136,11 @@ docstring sgml::cleanID(Buffer const & buf, OutputParams const & runparams,
|
|||||||
|
|
||||||
docstring content;
|
docstring content;
|
||||||
|
|
||||||
// FIXME THREAD
|
|
||||||
typedef map<docstring, docstring> MangledMap;
|
typedef map<docstring, docstring> MangledMap;
|
||||||
static MangledMap mangledNames;
|
static ThreadStorage<MangledMap> tMangledNames;
|
||||||
static int mangleID = 1;
|
MangledMap & mangledNames = *tMangledNames;
|
||||||
|
static ThreadStorage<int> tMangleID;
|
||||||
|
int & mangleID = *tMangleID;
|
||||||
|
|
||||||
MangledMap::const_iterator const known = mangledNames.find(orig);
|
MangledMap::const_iterator const known = mangledNames.find(orig);
|
||||||
if (known != mangledNames.end())
|
if (known != mangledNames.end())
|
||||||
|
Loading…
Reference in New Issue
Block a user