more docs/split and cleaning

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6421 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-10-18 00:31:24 +00:00
commit 09608bc2c5
9 changed files with 177 additions and 75 deletions

View file

@ -95,12 +95,12 @@ namespace swig {
template <class Type> struct traits_asval<Type*> {
static bool asval(PyObject *obj, Type **val) {
if (val) {
Type *p = 0;
int res = traits_asptr<Type>::asptr(obj, &p);
if (res) {
typedef typename noconst_traits<Type*>::noconst_type noconst_type;
*(const_cast<noconst_type*>(val)) = p;
return true;
typedef typename noconst_traits<Type>::noconst_type noconst_type;
noconst_type *p = 0;
int res = traits_asptr<noconst_type>::asptr(obj, &p);
if (res) {
*(const_cast<noconst_type**>(val)) = p;
return true;
} else {
return false;
}