add implicitconv support and cosmetics for cast rank
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8095 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
f31cdba60d
commit
e4637545e3
24 changed files with 484 additions and 308 deletions
|
|
@ -32,7 +32,7 @@ SWIG_AsVal(Type) (PyObject *o, Type* val)
|
|||
return SWIG_OK;
|
||||
} else {
|
||||
double d;
|
||||
int res = SWIG_CastRank(SWIG_AsVal(double)(o, &d));
|
||||
int res = SWIG_AddCast(SWIG_AsVal(double)(o, &d));
|
||||
if (SWIG_IsOK(res)) {
|
||||
if (val) *val = Constructor(d, 0.0);
|
||||
return res;
|
||||
|
|
@ -63,7 +63,7 @@ SWIG_AsVal(Type)(PyObject *o, Type *val)
|
|||
}
|
||||
} else {
|
||||
float re;
|
||||
int res = SWIG_CastRank(SWIG_AsVal(float)(o, &re));
|
||||
int res = SWIG_AddCast(SWIG_AsVal(float)(o, &re));
|
||||
if (SWIG_IsOK(res)) {
|
||||
if (val) *val = Constructor(re, 0.0);
|
||||
return res;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue