diff options
author | Xavier Delacour <xavier.delacour@gmail.com> | 2009-01-09 23:38:14 +0000 |
---|---|---|
committer | Xavier Delacour <xavier.delacour@gmail.com> | 2009-01-09 23:38:14 +0000 |
commit | 8b857aa9c1ed0f9a1bd209ff2dbbb6a9dee4b31f (patch) | |
tree | d0c3a695e7506eb343042681434b1bc088f1c713 | |
parent | 9c53670fed145fdc85861c3f69827afbac09b697 (diff) | |
download | swig-8b857aa9c1ed0f9a1bd209ff2dbbb6a9dee4b31f.tar.gz |
Fix octave tests li_std_pair_extra, arrays_global, grouping, struct_value, unions.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11046 626c5289-ae23-0410-ae9c-e8d60b6d4f22
-rw-r--r-- | Lib/octave/octrun.swg | 18 | ||||
-rw-r--r-- | Lib/octave/octruntime.swg | 1 |
2 files changed, 5 insertions, 14 deletions
diff --git a/Lib/octave/octrun.swg b/Lib/octave/octrun.swg index 07aa47cb5..c98dda984 100644 --- a/Lib/octave/octrun.swg +++ b/Lib/octave/octrun.swg @@ -684,22 +684,9 @@ namespace Swig { return outarg(0).string_value(); } - /* virtual Octave_map map_value() const { - octave_swig_type *nc_this = const_cast < octave_swig_type *>(this); - member_value_pair *m = nc_this->find_member("__str", false); - if (!m) { - error("__map method not defined"); - return std::string(); - } - octave_value_list outarg = nc_this->member_invoke(m, octave_value_list(nc_this->as_value()), 1); - if (outarg.length() < 1 || !outarg(0).is_map()) { - error("__map method did not return a string"); - return std::string(); - } - return outarg(0).map_value(); + return Octave_map(); } - */ virtual string_vector map_keys() const { member_map tmp; @@ -876,6 +863,9 @@ namespace Swig { virtual std::string string_value(bool force = false) const { return ptr->string_value(force); } + virtual Octave_map map_value() const + { return ptr->map_value(); } + virtual string_vector map_keys() const { return ptr->map_keys(); } diff --git a/Lib/octave/octruntime.swg b/Lib/octave/octruntime.swg index dd68ca4c1..82a17285a 100644 --- a/Lib/octave/octruntime.swg +++ b/Lib/octave/octruntime.swg @@ -3,6 +3,7 @@ #include <octave/parse.h> #include <octave/ov-fcn-handle.h> #include <octave/Cell.h> +#include <octave/oct-map.h> %} %insert(runtime) "swigrun.swg"; |