Index: cpp/frams/util/extvalue.cpp
===================================================================
--- cpp/frams/util/extvalue.cpp	(revision 370)
+++ cpp/frams/util/extvalue.cpp	(revision 371)
@@ -124,5 +124,5 @@
 }
 
-THREAD_LOCAL_DEF(ExtObject::Serialization, ExtObject::serialization);
+THREAD_LOCAL_DEF(ExtObject::Serialization, ExtObject_serialization);
 
 void ExtObject::Serialization::begin()
@@ -185,5 +185,5 @@
 SString ExtObject::serialize_inner() const
 {
-	int ref = tlsGetRef(serialization).add(*this);
+	int ref = tlsGetRef(ExtObject_serialization).add(*this);
 	if (ref >= 0)
 		return SString::sprintf("^%d", ref);
@@ -216,5 +216,5 @@
 	}
 
-	tlsGetRef(serialization).remove(*this);//undo nonserializable reference
+	tlsGetRef(ExtObject_serialization).remove(*this);//undo nonserializable reference
 	SString ret = interfaceName();
 	ret += SString::sprintf("<%p>", object ? object : paraminterface);
@@ -224,7 +224,7 @@
 SString ExtObject::serialize() const
 {
-	tlsGetRef(serialization).begin();
+	tlsGetRef(ExtObject_serialization).begin();
 	SString ret = serialize_inner();
-	tlsGetRef(serialization).end();
+	tlsGetRef(ExtObject_serialization).end();
 	return ret;
 }
@@ -998,5 +998,5 @@
 		VectorObject *vec = new VectorObject;
 		ExtObject o(&VectorObject::par, vec);
-		tlsGetRef(ExtObject::serialization).add(o);
+		tlsGetRef(ExtObject_serialization).add(o);
 		const char* p = in + 1;
 		ExtValue tmp;
@@ -1029,5 +1029,5 @@
 		DictionaryObject *dic = new DictionaryObject;
 		ExtObject o(&DictionaryObject::par, dic);
-		tlsGetRef(ExtObject::serialization).add(o);
+		tlsGetRef(ExtObject_serialization).add(o);
 		const char* p = in + 1;
 		ExtValue args[2]/*={value,key}*/, dummy_ret;
@@ -1080,5 +1080,5 @@
 		if (ret && (ref.getType() == TInt))
 		{
-			const ExtObject* o = tlsGetRef(ExtObject::serialization).get(ref.getInt());
+			const ExtObject* o = tlsGetRef(ExtObject_serialization).get(ref.getInt());
 			if (o)
 			{
@@ -1105,5 +1105,5 @@
 				{
 					cls->call(m, &tmp, this);
-					tlsGetRef(ExtObject::serialization).replace(tmp.getObject(), getObject());
+					tlsGetRef(ExtObject_serialization).replace(tmp.getObject(), getObject());
 					return ret;
 				}
@@ -1116,5 +1116,5 @@
 				{
 					cls->call(m, &tmp, this);
-					tlsGetRef(ExtObject::serialization).replace(tmp.getObject(), getObject());
+					tlsGetRef(ExtObject_serialization).replace(tmp.getObject(), getObject());
 					return ret;
 				}
@@ -1126,9 +1126,9 @@
 				{
 					cls->call(m, &tmp, this);
-					tlsGetRef(ExtObject::serialization).replace(tmp.getObject(), getObject());
+					tlsGetRef(ExtObject_serialization).replace(tmp.getObject(), getObject());
 					return ret;
 				}
 			}
-			tlsGetRef(ExtObject::serialization).remove(tmp.getObject());
+			tlsGetRef(ExtObject_serialization).remove(tmp.getObject());
 			setEmpty();
 		}
@@ -1144,7 +1144,7 @@
 const char* ExtValue::deserialize(const char* in)
 {
-	tlsGetRef(ExtObject::serialization).begin();
+	tlsGetRef(ExtObject_serialization).begin();
 	const char* ret = deserialize_inner(in);
-	tlsGetRef(ExtObject::serialization).end();
+	tlsGetRef(ExtObject_serialization).end();
 	return ret;
 }
Index: cpp/frams/util/extvalue.h
===================================================================
--- cpp/frams/util/extvalue.h	(revision 370)
+++ cpp/frams/util/extvalue.h	(revision 371)
@@ -99,6 +99,7 @@
 	};
 
-	static THREAD_LOCAL_DECL(Serialization, serialization);
-};
+};
+
+extern THREAD_LOCAL_DECL(ExtObject::Serialization, ExtObject_serialization);
 
 class ExtValue
Index: cpp/frams/vm/classes/collectionobj.cpp
===================================================================
--- cpp/frams/vm/classes/collectionobj.cpp	(revision 370)
+++ cpp/frams/vm/classes/collectionobj.cpp	(revision 371)
@@ -149,5 +149,5 @@
 }
 
-static THREAD_LOCAL_DEF(SList,tostring_trace);
+static THREAD_LOCAL_DEF(SList,VectorObject_tostring_trace);
 
 void VectorObject::get_toString(ExtValue* ret)
@@ -155,9 +155,9 @@
 SString out="[";
 //static SListTempl<VectorObject*> trace;
-if (tlsGetRef(tostring_trace).find(this)>=0)
+if (tlsGetRef(VectorObject_tostring_trace).find(this)>=0)
 	out+="...";
 else
 	{
-	tlsGetRef(tostring_trace)+=this;
+	tlsGetRef(VectorObject_tostring_trace)+=this;
 	for(int i=0;i<data.size();i++)
 		{
@@ -169,5 +169,5 @@
 			out+="null";
 		}
-	tlsGetRef(tostring_trace)-=this;
+	tlsGetRef(VectorObject_tostring_trace)-=this;
 	}
 out+="]";
@@ -402,9 +402,9 @@
 SString out="{";
 //static SListTempl<DictionaryObject*> trace;
-if (tlsGetRef(tostring_trace).find(this)>=0)
+if (tlsGetRef(VectorObject_tostring_trace).find(this)>=0)
 	out+="...";
 else
 	{
-	tlsGetRef(tostring_trace)+=this;
+	tlsGetRef(VectorObject_tostring_trace)+=this;
 	for(HashEntryIterator it(hash);it.isValid();)
 		{
@@ -418,5 +418,5 @@
 		if (it.isValid()) out+=",";
 		}
-	tlsGetRef(tostring_trace)-=this;
+	tlsGetRef(VectorObject_tostring_trace)-=this;
 	}
 out+="}";
