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:
parent
53f6f300a0
commit
09608bc2c5
9 changed files with 177 additions and 75 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue