massive typemap unification

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7676 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-10-18 13:24:15 +00:00
commit 1c7c9e44f7
144 changed files with 6378 additions and 7248 deletions

View file

@ -142,7 +142,7 @@ namespace swig {
template <> struct traits_asval<Type > {
typedef Type value_type;
static int asval(PyObject *obj, value_type *val) {
return SWIG_AsVal(Type)(obj, val);
return SWIG_AsVal(Type)(obj, val) == SWIG_OK;
}
};
template <> struct traits_from<Type > {
@ -160,14 +160,12 @@ namespace swig {
*/
%define %typemap_traits(Code,Type...)
%typemap_ascheckfrom(SWIG_arg(Code),
SWIG_arg(swig::as<Type >),
SWIG_arg(swig::check<Type >),
SWIG_arg(swig::from),
SWIG_arg(SWIG_Traits_frag(Type)),
SWIG_arg(SWIG_Traits_frag(Type)),
SWIG_arg(SWIG_Traits_frag(Type)),
Type);
%typemap_asvalfrom(SWIG_arg(Code),
SWIG_arg(swig::asval<Type >),
SWIG_arg(swig::from),
SWIG_arg(SWIG_Traits_frag(Type)),
SWIG_arg(SWIG_Traits_frag(Type)),
Type);
%enddef
/*