PageRenderTime 42ms CodeModel.GetById 18ms 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. %fragment("StdListTraits","header",fragment="StdSequenceTraits")
  5. %{
  6. namespace swig {
  7. template <class T >
  8. struct traits_asptr<std::list<T> > {
  9. static int asptr(PyObject *obj, std::list<T> **lis) {
  10. return traits_asptr_stdseq<std::list<T> >::asptr(obj, lis);
  11. }
  12. };
  13. template <class T>
  14. struct traits_from<std::list<T> > {
  15. static PyObject *from(const std::list<T> & vec) {
  16. return traits_from_stdseq<std::list<T> >::from(vec);
  17. }
  18. };
  19. }
  20. %}
  21. #define %swig_list_methods(Type...) %swig_sequence_methods(Type)
  22. #define %swig_list_methods_val(Type...) %swig_sequence_methods_val(Type);
  23. %include <std/std_list.i>