我正在使用SWIG,我的函数返回一个char *malloc'ed.SWIG回归PyString_FromStringAndSize(my-char-str, len).
char *
PyString_FromStringAndSize(my-char-str, len)
有没有办法在my-char-str不编辑C包装器代码的情况下释放它?
my-char-str
c python swig
c ×1
python ×1
swig ×1