From 64641c97504d71db5c3f5c29a3ccaa6539bab75a Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Mon, 10 May 2010 18:21:34 +0000 Subject: [PATCH] Fix compile errors in Octave std::map wrappers. Remove li_std_map_runme.oct which looks like Python code git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12018 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/test-suite/octave/li_std_map_runme.m | 61 ------------------- Lib/octave/std_map.i | 8 +-- 2 files changed, 4 insertions(+), 65 deletions(-) delete mode 100644 Examples/test-suite/octave/li_std_map_runme.m diff --git a/Examples/test-suite/octave/li_std_map_runme.m b/Examples/test-suite/octave/li_std_map_runme.m deleted file mode 100644 index f37c78012..000000000 --- a/Examples/test-suite/octave/li_std_map_runme.m +++ /dev/null @@ -1,61 +0,0 @@ -li_std_map - -a1 = li_std_map.A(3); -a2 = li_std_map.A(7); - - -p0 = li_std_map.pairii(1,2); -p1 = li_std_map.pairA(1,a1.this); -m = {}; -m{1} = a1; -m{2} = a2; - -pp1 = li_std_map.p_identa(p1); -mm = li_std_map.m_identa(m); - - - -m = li_std_map.mapA(); -m{1} = a1; -m{2} = a2; - - -pm ={}; -for k in m, - pm{k} = m{k}; -endfor - -for k in m, - if (swig_this(pm{k}) != swig_this(m{k})) - error - endif -endfor - - - -m = {}; -m{1} = [1,2]; -m["foo"] = "hello"; - -pm = li_std_map.pymap(); - -for k in m, - pm{k} = m{k}; -endfor - -for k in pm, - if (pm{k} != m{k}) - error - endif -endfor - -mii = li_std_map.IntIntMap(); - -mii{1} = 1; -mii{1} = 2; - -if (mii[1] != 2) - error -endif - - diff --git a/Lib/octave/std_map.i b/Lib/octave/std_map.i index 20003df58..6c476ce53 100644 --- a/Lib/octave/std_map.i +++ b/Lib/octave/std_map.i @@ -92,10 +92,10 @@ }; template - struct OctMapIterator_T : SwigPyIteratorClosed_T + struct OctMapIterator_T : OctSwigIteratorClosed_T { OctMapIterator_T(OutIterator curr, OutIterator first, OutIterator last, octave_value seq) - : SwigPyIteratorClosed_T(curr, first, last, seq) + : OctSwigIteratorClosed_T(curr, first, last, seq) { } }; @@ -112,7 +112,7 @@ }; template - inline SwigPyIterator* + inline OctSwigIterator* make_output_key_iterator(const OutIter& current, const OutIter& begin, const OutIter& end, octave_value seq = octave_value()) { return new OctMapKeyIterator_T(current, begin, end, seq); @@ -130,7 +130,7 @@ template - inline SwigPyIterator* + inline OctSwigIterator* make_output_value_iterator(const OutIter& current, const OutIter& begin, const OutIter& end, octave_value seq = 0) { return new OctMapValueIterator_T(current, begin, end, seq);