Remove conversion from one STL container to another

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10214 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2008-01-21 21:59:02 +00:00
commit cb9d191276
4 changed files with 42 additions and 8 deletions

View file

@ -702,7 +702,14 @@ namespace swig {
typedef T value_type;
static int asptr(PyObject *obj, sequence **seq) {
if (PySequence_Check(obj)) {
if (SWIG_Python_GetSwigThis(obj)) {
sequence *p;
if (SWIG_ConvertPtr(obj,(void**)&p,
swig::type_info<sequence>(),0) == SWIG_OK) {
if (seq) *seq = p;
return SWIG_OLDOBJ;
}
} else if (PySequence_Check(obj)) {
try {
PySequence_Cont<value_type> pyseq(obj);
if (seq) {
@ -721,13 +728,6 @@ namespace swig {
}
return SWIG_ERROR;
}
} else {
sequence *p;
if (SWIG_ConvertPtr(obj,(void**)&p,
swig::type_info<sequence>(),0) == SWIG_OK) {
if (seq) *seq = p;
return SWIG_OLDOBJ;
}
}
return SWIG_ERROR;
}