From 3a2318cb579edb3d1545210911b0058563521e3d Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Wed, 26 Apr 2023 19:38:39 +0100 Subject: Finish removal of SwigPySequence_Cont --- Lib/python/pycontainer.swg | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'Lib') diff --git a/Lib/python/pycontainer.swg b/Lib/python/pycontainer.swg index 2c0466c21..ceee27f5d 100644 --- a/Lib/python/pycontainer.swg +++ b/Lib/python/pycontainer.swg @@ -456,12 +456,6 @@ namespace swig { } } -%fragment("SwigPySequence_Cont","header", - fragment="StdTraits", - fragment="SwigPySequence_Base", - fragment="SwigPyIterator_T") -{} - %define %swig_sequence_iterator(Sequence...) %swig_sequence_iterator_with_making_function(swig::make_output_iterator,Sequence...) %enddef @@ -477,12 +471,12 @@ namespace swig { class const_iterator; class const_reverse_iterator; - %typemap(out,noblock=1,fragment="SwigPySequence_Cont") + %typemap(out,noblock=1,fragment="SwigPyIterator_T") iterator, reverse_iterator, const_iterator, const_reverse_iterator { $result = SWIG_NewPointerObj(Make_output_iterator(%static_cast($1,const $type &)), swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); } - %typemap(out,noblock=1,fragment="SwigPySequence_Cont") + %typemap(out,noblock=1,fragment="SwigPyIterator_T") std::pair, std::pair { $result = PyTuple_New(2); PyTuple_SetItem($result,0,SWIG_NewPointerObj(Make_output_iterator(%static_cast($1,const $type &).first), @@ -491,7 +485,7 @@ namespace swig { swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN)); } - %fragment("SwigPyPairBoolOutputIterator","header",fragment=SWIG_From_frag(bool),fragment="SwigPySequence_Cont") {} + %fragment("SwigPyPairBoolOutputIterator","header",fragment=SWIG_From_frag(bool),fragment="SwigPyIterator_T") {} %typemap(out,noblock=1,fragment="SwigPyPairBoolOutputIterator") std::pair, std::pair { @@ -501,7 +495,7 @@ namespace swig { PyTuple_SetItem($result,1,SWIG_From(bool)(%static_cast($1,const $type &).second)); } - %typemap(in,noblock=1,fragment="SwigPySequence_Cont") + %typemap(in,noblock=1,fragment="SwigPyIterator_T") iterator(swig::SwigPyIterator *iter = 0, int res), reverse_iterator(swig::SwigPyIterator *iter = 0, int res), const_iterator(swig::SwigPyIterator *iter = 0, int res), @@ -519,14 +513,14 @@ namespace swig { } } - %typecheck(%checkcode(ITERATOR),noblock=1,fragment="SwigPySequence_Cont") + %typecheck(%checkcode(ITERATOR),noblock=1,fragment="SwigPyIterator_T") iterator, reverse_iterator, const_iterator, const_reverse_iterator { swig::SwigPyIterator *iter = 0; int res = SWIG_ConvertPtr($input, %as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); $1 = (SWIG_IsOK(res) && iter && (dynamic_cast *>(iter) != 0)); } - %fragment("SwigPySequence_Cont"); + %fragment("SwigPyIterator_T"); %newobject iterator(PyObject **PYTHON_SELF); %extend { @@ -772,7 +766,7 @@ namespace swig { %fragment("StdSequenceTraits","header", fragment="StdTraits", - fragment="SwigPySequence_Cont") + fragment="SwigPySequence_Base") { namespace swig { template -- cgit v1.2.1