Fix thread safety of llList2CSV.

This commit is contained in:
Sei Lisa 2014-07-26 21:25:06 +02:00
parent a3de885bf7
commit e8e411ad04

View file

@ -916,11 +916,16 @@ def llIntegerToBase64(x):
def llList2CSV(lst): def llList2CSV(lst):
assert islist(lst) assert islist(lst)
# WARNING: FIXME: NOT THREAD SAFE ret = []
tmp = lslcommon.LSO for elem in val:
lslcommon.LSO = True # Use LSO rules for float to string conversion # This always uses LSO rules for float to string.
ret = u', '.join(InternalList2Strings(lst)) if type(elem) == float:
lslcommon.LSO = tmp ret.append(u'%.6f' % elem)
elif type(elem) in (Vector, Quaternion):
ret.append(u'<' + u', '.join(list(u'%.6f' % x for x in elem)) + u'>')
else:
ret.append(InternalTypecast(elem, unicode, InList=True, f32=True))
ret = u', '.join(ret)
return ret return ret
def llList2Float(lst, pos): def llList2Float(lst, pos):