diff options
Diffstat (limited to 'linux-x86/share/swig/python/carrays.i')
-rw-r--r-- | linux-x86/share/swig/python/carrays.i | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/linux-x86/share/swig/python/carrays.i b/linux-x86/share/swig/python/carrays.i new file mode 100644 index 0000000..74b2be9 --- /dev/null +++ b/linux-x86/share/swig/python/carrays.i @@ -0,0 +1,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> + + + + |