diff options
author | Gonzalo Garramuno <ggarra@advancedsl.com.ar> | 2007-05-01 06:43:56 +0000 |
---|---|---|
committer | Gonzalo Garramuno <ggarra@advancedsl.com.ar> | 2007-05-01 06:43:56 +0000 |
commit | 8564ff90c00cb7bce9ac7c3b758dd0f37b70257e (patch) | |
tree | 807345b96438aa8b148b687647aa948ebd7ec177 /Lib/ruby/std_set.i | |
parent | 163efb1923d713de69aa1aad7ea949b2acca3372 (diff) | |
download | swig-8564ff90c00cb7bce9ac7c3b758dd0f37b70257e.tar.gz |
Improved multimap, vector and set by rearranging
some methods.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9739 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Lib/ruby/std_set.i')
-rw-r--r-- | Lib/ruby/std_set.i | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/Lib/ruby/std_set.i b/Lib/ruby/std_set.i index d0c3c992c..793172b32 100644 --- a/Lib/ruby/std_set.i +++ b/Lib/ruby/std_set.i @@ -36,11 +36,11 @@ %} %define %swig_set_methods(set...) - %swig_sequence_iterator(set); - %swig_container_methods(set); + %swig_sequence_methods_common(set); %extend { - const value_type& push(value_type x) { + %alias push "<<"; + value_type push(value_type x) { self->insert(x); return x; } @@ -57,4 +57,17 @@ }; %enddef +#if defined(SWIG_RUBY_AUTORENAME) + +// %mixin std::set "Enumerable"; + %rename("empty?") std::set::empty; + +#else + +// %mixin std::set "Enumerable"; + %rename("empty?") std::set::empty; + +#endif + + %include <std/std_set.i> |