Added an implementation of std_stack.i with

proper tests.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9778 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Gonzalo Garramuno 2007-05-06 05:13:17 +00:00
commit 5e27a6828a
5 changed files with 202 additions and 0 deletions

24
Lib/ruby/std_stack.i Normal file
View file

@ -0,0 +1,24 @@
/*
Stacks
*/
%fragment("StdStackTraits","header",fragment="StdSequenceTraits")
%{
namespace swig {
template <class T>
struct traits_asptr<std::stack<T> > {
static int asptr(VALUE obj, std::stack<T> **vec) {
return traits_asptr_stdseq<std::stack<T> >::asptr(obj, vec);
}
};
template <class T>
struct traits_from<std::stack<T> > {
static VALUE from(const std::stack<T> & vec) {
return traits_from_stdseq<std::stack<T> >::from(vec);
}
};
}
%}
%include <std/std_stack.i>