Skip to content

Commit

Permalink
fix python out typemap for strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Soeren Sonnenburg committed Jul 26, 2011
1 parent 595aee7 commit 6ffbbae
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/interfaces/python_modular/swig_typemaps.i
Expand Up @@ -496,7 +496,7 @@ TYPEMAP_STRINGFEATURES_IN(PyObject, NPY_OBJECT)

/* output typemap for CStringFeatures */
%define TYPEMAP_STRINGFEATURES_OUT(type,typecode)
%typemap(out) shogun::SGString<type>
%typemap(out) shogun::SGStringList<type>
{
shogun::SGString<type>* str=$1.strings;
int32_t num=$1.num_strings;
Expand Down Expand Up @@ -532,9 +532,7 @@ TYPEMAP_STRINGFEATURES_IN(PyObject, NPY_OBJECT)
}

PyList_SetItem(list, i, s);
delete[] str[i].string;
}
delete[] str;
$result = list;
}
else
Expand Down

0 comments on commit 6ffbbae

Please sign in to comment.