fix char* typemap in bug #1080514
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6856 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8147bda2dd
commit
66c195b89d
4 changed files with 27 additions and 8 deletions
|
|
@ -40,12 +40,11 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize)
|
|||
SWIGINTERNSHORT int
|
||||
SWIG_AsCharPtr(PyObject *obj, char **val)
|
||||
{
|
||||
char* cptr = 0;
|
||||
if (SWIG_AsCharPtrAndSize(obj, &cptr, (size_t*)(0))) {
|
||||
if (val) *val = cptr;
|
||||
if (SWIG_AsCharPtrAndSize(obj, val, (size_t*)(0))) {
|
||||
return 1;
|
||||
}
|
||||
if (val) {
|
||||
PyErr_Clear();
|
||||
SWIG_type_error("char *", obj);
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue