Fix SF#2564192
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11110 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
648fa408b4
commit
6574067b72
3 changed files with 12 additions and 1 deletions
|
|
@ -6,6 +6,11 @@
|
|||
SWIGINTERN int
|
||||
SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc)
|
||||
{
|
||||
if (SvMAGICAL(obj)) {
|
||||
SV *tmp = sv_newmortal();
|
||||
SvSetSV(tmp, obj);
|
||||
obj = tmp;
|
||||
}
|
||||
if (SvPOK(obj)) {
|
||||
STRLEN len = 0;
|
||||
char *cstr = SvPV(obj, len);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue