changeset 247:c3addc52dfcd

pyeval: allow evaluated value of None (fixes issue #31) * pyeval.cc (Fpyeval): Allow return value to be None when being assigned to an lvalue.
author Mike Miller <mtmiller@octave.org>
date Wed, 27 Jul 2016 17:20:01 -0700
parents 4acc64f89d67
children 2e4c9ce0c83c
files pyeval.cc
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pyeval.cc	Wed Jul 27 17:05:09 2016 -0700
+++ b/pyeval.cc	Wed Jul 27 17:20:01 2016 -0700
@@ -87,8 +87,7 @@
       object idtmp = hex_function (id_function (res));
       id = extract<std::string> (idtmp);
 
-      // FIXME: currently, we cannot return the raw object to octave...
-      if (! res.is_none ())
+      if (nargout > 0 || ! res.is_none ())
         {
           octave_value val;
           pytave::pyobj_to_octvalue (val, res);