# HG changeset patch
# User Jean-Pierre Flori <flori@enst.fr>
# Date 1299059470 -3600
# Node ID d63ed2bc06f3757a70ca54179032ba6ef92f0d03
# Parent ddf7ef006e3a7b2d95f62bbea8624888ed8256c7
Convert unicode to str before conversion to ecl_object
diff -r ddf7ef006e3a -r d63ed2bc06f3 sage/libs/ecl.pyx
a
|
b
|
|
284 | 284 | return string_to_object(s) |
285 | 285 | elif isinstance(pyobj,float): |
286 | 286 | return ecl_make_doublefloat(pyobj) |
| 287 | elif isinstance(pyobj,unicode): |
| 288 | s=<bytes>(str(pyobj)) |
| 289 | return ecl_safe_read_string(s) |
287 | 290 | elif isinstance(pyobj,bytes): |
288 | 291 | s=<bytes>pyobj |
289 | 292 | return ecl_safe_read_string(s) |