pystrings.swg cosmetic formatting
This commit is contained in:
parent
01611702ec
commit
e07938ae8e
1 changed files with 7 additions and 8 deletions
|
|
@ -42,18 +42,17 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
|
||||||
%#else
|
%#else
|
||||||
if (*alloc == SWIG_NEWOBJ)
|
if (*alloc == SWIG_NEWOBJ)
|
||||||
%#endif
|
%#endif
|
||||||
{
|
{
|
||||||
*cptr = %new_copy_array(cstr, len + 1, char);
|
*cptr = %new_copy_array(cstr, len + 1, char);
|
||||||
*alloc = SWIG_NEWOBJ;
|
*alloc = SWIG_NEWOBJ;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
*cptr = cstr;
|
*cptr = cstr;
|
||||||
*alloc = SWIG_OLDOBJ;
|
*alloc = SWIG_OLDOBJ;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
%#if PY_VERSION_HEX>=0x03000000
|
%#if PY_VERSION_HEX>=0x03000000
|
||||||
assert(0); /* Should never reach here in Python 3 */
|
assert(0); /* Should never reach here in Python 3 */
|
||||||
%#endif
|
%#endif
|
||||||
*cptr = SWIG_Python_str_AsChar(obj);
|
*cptr = SWIG_Python_str_AsChar(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue