aboutsummaryrefslogtreecommitdiff
path: root/Lib/python/carrays.i
blob: a7b6120d38ee78049541911f6e4e355362196906 (plain)
1
2
3
4
5
6
7
8
9
%define %array_class(TYPE,NAME)
#if defined(SWIGPYTHON_BUILTIN)
  %feature("python:slot", "sq_item", functype="ssizeargfunc") NAME::__getitem__;
  %feature("python:slot", "sq_ass_item", functype="ssizeobjargproc") NAME::__setitem__;
#endif
%array_class_wrap(TYPE,NAME,__getitem__,__setitem__)
%enddef

%include <typemaps/carrays.swg>