summaryrefslogtreecommitdiffstats
path: root/contrib/tools/swig/Lib/python/std_unordered_set.i
diff options
context:
space:
mode:
authoralevitskii <[email protected]>2025-09-02 06:57:05 +0300
committeralevitskii <[email protected]>2025-09-02 07:19:27 +0300
commit7e399723cf6d967e20c8f9d2ee975426636242c5 (patch)
treeabd5283daba11c07afc8fc16f02aec2c19e2272a /contrib/tools/swig/Lib/python/std_unordered_set.i
parent14e9c865541d5abe545cb496c0143e4905b00c78 (diff)
Drop LINTER param from styling macroses and cleanup deps
Drop LINTER param from styling macroses commit_hash:00dd2e2ee103e509cff38f520d4779974abe39a7
Diffstat (limited to 'contrib/tools/swig/Lib/python/std_unordered_set.i')
-rw-r--r--contrib/tools/swig/Lib/python/std_unordered_set.i56
1 files changed, 0 insertions, 56 deletions
diff --git a/contrib/tools/swig/Lib/python/std_unordered_set.i b/contrib/tools/swig/Lib/python/std_unordered_set.i
deleted file mode 100644
index fd866b14aa0..00000000000
--- a/contrib/tools/swig/Lib/python/std_unordered_set.i
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- Unordered Sets
-*/
-
-%fragment("StdUnorderedSetTraits","header",fragment="StdSequenceTraits")
-%{
- namespace swig {
- template <class Key, class Hash, class Compare, class Alloc>
- struct traits_reserve<std::unordered_set<Key,Hash,Compare,Alloc> > {
- static void reserve(std::unordered_set<Key,Hash,Compare,Alloc> &seq, typename std::unordered_set<Key,Hash,Compare,Alloc>::size_type n) {
- seq.reserve(n);
- }
- };
-
- template <class Key, class Hash, class Compare, class Alloc>
- struct traits_asptr<std::unordered_set<Key,Hash,Compare,Alloc> > {
- static int asptr(PyObject *obj, std::unordered_set<Key,Hash,Compare,Alloc> **s) {
- return traits_asptr_stdseq<std::unordered_set<Key,Hash,Compare,Alloc> >::asptr(obj, s);
- }
- };
-
- template <class Key, class Hash, class Compare, class Alloc>
- struct traits_from<std::unordered_set<Key,Hash,Compare,Alloc> > {
- static PyObject *from(const std::unordered_set<Key,Hash,Compare,Alloc>& vec) {
- return traits_from_stdseq<std::unordered_set<Key,Hash,Compare,Alloc> >::from(vec);
- }
- };
- }
-%}
-
-%define %swig_unordered_set_methods(unordered_set...)
- %swig_sequence_forward_iterator(unordered_set);
- %swig_container_methods(unordered_set);
-
-#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);
- }
-
- bool __contains__(value_type x) {
- return self->find(x) != self->end();
- }
-
- value_type __getitem__(difference_type i) const throw (std::out_of_range) {
- return *(swig::cgetpos(self, i));
- }
- }
-%enddef
-
-%include <std/std_unordered_set.i>