Mercurial > pytave
diff pyeval.cc @ 365:087e7bc3697f
Do not automatically convert Python strings to Octave strings (fixes issue #65)
* python_to_octave.cc (pytave::pyobj_to_octvalue): Drop conversion of bytes and
unicode objects.
* __py_struct_from_dict__.cc (F__py_string_value__): New function.
* @pyobject/char.m: Define outside class definition, use __py_string_value__.
* @pyobject/pyobject.m: Delete previous pyobject.char definition.
* @pyobject/methods.m: Apply char conversion to __name__ attribute.
* @py/py.m, @pyobject/cell.m, @pyobject/dummy.m, @pyobject/subsasgn.m,
@pyobject/subsref.m, pyargs.m, pycall.cc, pyeval.cc: Adapt examples and tests
to changes.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Thu, 25 Aug 2016 14:06:56 -0700 |
parents | 1470ed26917a |
children | 3644df6564bc |
line wrap: on
line diff
--- a/pyeval.cc Thu Aug 25 12:11:02 2016 -0700 +++ b/pyeval.cc Thu Aug 25 14:06:56 2016 -0700 @@ -125,8 +125,8 @@ %!assert (iscomplex (pyeval ("2j"))) %!assert (pyeval ("2j"), 2j) -%!assert (ischar (pyeval ("\"I <3 Octave\""))) -%!assert (pyeval ("\"I <3 Octave\""), "I <3 Octave") +%!assert (ischar (char (pyeval ("\"I <3 Octave\"")))) +%!assert (char (pyeval ("\"I <3 Octave\"")), "I <3 Octave") %!assert (islogical (pyeval ("True"))) %!assert (islogical (pyeval ("False")))