more on the TypeQuery fix
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7971 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ee6f1efd83
commit
abbf8b406a
6 changed files with 81 additions and 36 deletions
|
|
@ -27,11 +27,13 @@ SWIG_AsWCharPtrAndSize(PyObject *obj, wchar_t **cptr, size_t *psize, int *alloc)
|
|||
return SWIG_OK;
|
||||
} else {
|
||||
swig_type_info* pwchar_descriptor = SWIG_pwchar_descriptor();
|
||||
wchar_t * vptr = 0;
|
||||
if (pwchar_descriptor && (SWIG_ConvertPtr(obj, (void**)&vptr, pwchar_descriptor, 0) == SWIG_OK)) {
|
||||
if (cptr) *cptr = vptr;
|
||||
if (psize) *psize = vptr ? (wcslen(vptr) + 1) : 0;
|
||||
return SWIG_OK;
|
||||
if (pwchar_descriptor) {
|
||||
wchar_t * vptr = 0;
|
||||
if (SWIG_ConvertPtr(obj, (void**)&vptr, pwchar_descriptor, 0) == SWIG_OK) {
|
||||
if (cptr) *cptr = vptr;
|
||||
if (psize) *psize = vptr ? (wcslen(vptr) + 1) : 0;
|
||||
return SWIG_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
return SWIG_TypeError;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue