diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2018-09-21 19:19:01 +0100 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2018-09-23 19:09:54 +0100 |
commit | 05d6717de903c8ee0ab413060f8d75999ffaa8fc (patch) | |
tree | 94ca0116f653ccedb7e8c3bc41c3eeb01d1cfc20 /Lib/python | |
parent | 4715a4e72c7ab6119a65f0e1af7c7400ebfaebe8 (diff) | |
download | swig-05d6717de903c8ee0ab413060f8d75999ffaa8fc.tar.gz |
Python builtin - add indexing support to std::set
Diffstat (limited to 'Lib/python')
-rw-r--r-- | Lib/python/std_set.i | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/python/std_set.i b/Lib/python/std_set.i index e80daee7e..0ef011998 100644 --- a/Lib/python/std_set.i +++ b/Lib/python/std_set.i @@ -37,10 +37,11 @@ %swig_container_methods(set); #if defined(SWIGPYTHON_BUILTIN) + %feature("python:slot", "mp_subscript", functype="binaryfunc") __getitem__; %feature("python:slot", "sq_contains", functype="objobjproc") __contains__; #endif - %extend { + %extend { void append(value_type x) { self->insert(x); } @@ -60,8 +61,7 @@ void discard(value_type x) { self->erase(x); } - - }; + } %enddef %include <std/std_set.i> |