summaryrefslogtreecommitdiff
path: root/Lib/python/carrays.i
blob: 74b2be9c4b6cdab1a0e8bd9fa1ff7bc9a31f3cbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
%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>