PageRenderTime 20ms CodeModel.GetById 19ms app.highlight 0ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/rel-1-3-26/SWIG/Lib/python/std_list.i

#
Swig | 28 lines | 20 code | 5 blank | 3 comment | 0 complexity | 5d97582cb93e0759aa23a8cd7681246e MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
 1/*
 2  Lists
 3*/
 4
 5%fragment("StdListTraits","header",fragment="StdSequenceTraits")
 6%{
 7  namespace swig {
 8    template <class T >
 9    struct traits_asptr<std::list<T> >  {
10      static int asptr(PyObject *obj, std::list<T> **lis) {
11	return traits_asptr_stdseq<std::list<T> >::asptr(obj, lis);
12      }
13    };
14
15    template <class T>
16    struct traits_from<std::list<T> > {
17      static PyObject *from(const std::list<T> & vec) {
18	return traits_from_stdseq<std::list<T> >::from(vec);
19      }
20    };
21  }
22%}
23
24#define %swig_list_methods(Type...) %swig_sequence_methods(Type)
25#define %swig_list_methods_val(Type...) %swig_sequence_methods_val(Type);
26
27%include <std/std_list.i>
28