summaryrefslogtreecommitdiff
path: root/Lib/perl5/perlrun.swg
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2008-12-06 17:18:38 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2008-12-06 17:18:38 +0000
commitdfd94424bae7a7849e03562d85f977ae962dc514 (patch)
treed8782cf75e10921bec29aad628f96e0d9717934f /Lib/perl5/perlrun.swg
parentffdf269634d40e4b1722a663690cfb5a086ebd16 (diff)
downloadswig-dfd94424bae7a7849e03562d85f977ae962dc514.tar.gz
remove SWIG_TypeCheck_Template so that the code within it is debuggable
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10966 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Lib/perl5/perlrun.swg')
-rw-r--r--Lib/perl5/perlrun.swg25
1 files changed, 22 insertions, 3 deletions
diff --git a/Lib/perl5/perlrun.swg b/Lib/perl5/perlrun.swg
index 54d098d9b..6fb2968f0 100644
--- a/Lib/perl5/perlrun.swg
+++ b/Lib/perl5/perlrun.swg
@@ -205,13 +205,32 @@ SWIG_Perl_TypeProxyName(const swig_type_info *type) {
}
}
+/* Identical to SWIG_TypeCheck, except for strcmp comparison */
SWIGRUNTIME swig_cast_info *
SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) {
- SWIG_TypeCheck_Template(( (!iter->type->clientdata && (strcmp(iter->type->name, c) == 0))
- || (iter->type->clientdata && (strcmp((char*)iter->type->clientdata, c) == 0))), ty);
+ if (ty) {
+ swig_cast_info *iter = ty->cast;
+ while (iter) {
+ if ( (!iter->type->clientdata && (strcmp(iter->type->name, c) == 0)) ||
+ (iter->type->clientdata && (strcmp((char*)iter->type->clientdata, c) == 0)) ) {
+ if (iter == ty->cast)
+ return iter;
+ /* Move iter to the top of the linked list */
+ iter->prev->next = iter->next;
+ if (iter->next)
+ iter->next->prev = iter->prev;
+ iter->next = ty->cast;
+ iter->prev = 0;
+ if (ty->cast) ty->cast->prev = iter;
+ ty->cast = iter;
+ return iter;
+ }
+ iter = iter->next;
+ }
+ }
+ return 0;
}
-
/* Function for getting a pointer value */
SWIGRUNTIME int