Python builtin - add indexing support to std::unordered_set
This commit is contained in:
parent
05d6717de9
commit
146998ce81
2 changed files with 3 additions and 0 deletions
|
|
@ -45,8 +45,10 @@
|
|||
|
||||
#if defined(SWIGPYTHON_BUILTIN)
|
||||
%feature("python:slot", "sq_contains", functype="objobjproc") __contains__;
|
||||
%feature("python:slot", "mp_subscript", functype="binaryfunc") __getitem__;
|
||||
#endif
|
||||
|
||||
|
||||
%extend {
|
||||
void append(value_type x) {
|
||||
self->insert(x);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue