mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
Fix thread safety of llList2CSV.
This commit is contained in:
parent
a3de885bf7
commit
e8e411ad04
1 changed files with 10 additions and 5 deletions
|
@ -916,11 +916,16 @@ def llIntegerToBase64(x):
|
|||
|
||||
def llList2CSV(lst):
|
||||
assert islist(lst)
|
||||
# WARNING: FIXME: NOT THREAD SAFE
|
||||
tmp = lslcommon.LSO
|
||||
lslcommon.LSO = True # Use LSO rules for float to string conversion
|
||||
ret = u', '.join(InternalList2Strings(lst))
|
||||
lslcommon.LSO = tmp
|
||||
ret = []
|
||||
for elem in val:
|
||||
# This always uses LSO rules for float to string.
|
||||
if type(elem) == float:
|
||||
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
|
||||
|
||||
def llList2Float(lst, pos):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue