changeset 10184:b39bd23019eb

partially revert a668fbd32e34
author Jaroslav Hajek <highegg@gmail.com>
date Thu, 21 Jan 2010 21:27:16 +0100
parents bb97e11ce1ba
children 455759a5fcbe
files src/ChangeLog src/ov-builtin.cc src/ov-dld-fcn.cc src/ov-dld-fcn.h src/ov-type-conv.h
diffstat 5 files changed, 11 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
+2010-01-21  Jaroslav Hajek  <highegg@gmail.com>
+
+	* ov-builtin.cc (octave_builtin::do_multi_index_op): Partially undo
+	previous change.
+	* ov-type-conv.h (octave_type_conv_body): Undo previous change.
+	* ov-dld-fcn.cc (octave_dld_function::do_multi_index_op): Ditto.
+
 2010-01-21  John W. Eaton  <jwe@octave.org>
 
 	* DLD-FUNCTIONS/getrusage.cc, DLD-FUNCTIONS/getgrent.cc,
--- a/src/ov-builtin.cc
+++ b/src/ov-builtin.cc
@@ -105,8 +105,9 @@
       try
 	{
 	  retval = (*f) (args, nargout);
-          // We don't check for null values here, builtins should handle that
-          // possibility themselves.
+          // Do not allow null values to be returned from functions.
+          // FIXME -- perhaps true builtins should be allowed?
+          retval.make_storable_values ();
           // Fix the case of a single undefined value.
           // This happens when a compiled function uses
           //   octave_value retval;
--- a/src/ov-dld-fcn.cc
+++ b/src/ov-dld-fcn.cc
@@ -89,14 +89,3 @@
 {
   return new octave_dld_function (ff, shl, nm, ds);
 }
-
-octave_value_list
-octave_dld_function::do_multi_index_op (int nargout, const octave_value_list& args)
-{
-  octave_value_list retval = this->octave_builtin::do_multi_index_op (nargout, args);
-  // Guard against the possibility of null values leaking from user DLD functions.
-  // FIXME: is this needed?
-  retval.make_storable_values ();
-
-  return retval;
-}
--- a/src/ov-dld-fcn.h
+++ b/src/ov-dld-fcn.h
@@ -75,9 +75,6 @@
   octave_shlib get_shlib (void) const
     { return sh_lib; }
 
-  octave_value_list
-  do_multi_index_op (int nargout, const octave_value_list& args);
-
 private:
 
   octave_shlib sh_lib;
--- a/src/ov-type-conv.h
+++ b/src/ov-type-conv.h
@@ -32,7 +32,7 @@
 
   if (t_arg == t_result || arg.class_name () == name)
     {
-      retval = arg.storable_value ();
+      retval = arg;
     }
   else
     {