The replacement, SWIG_PyUnicode_AsUTF8AndSize, has different memory management requirements.
Doesn't ldns_dname_new_frm_str make a copy of the input string? Then the arginit/freearg constructs aren't needed, and the deallocation of the intermediate Python string could happen locally.
The replacement,
SWIG_PyUnicode_AsUTF8AndSize
, has different memory management requirements.Doesn't
ldns_dname_new_frm_str
make a copy of the input string? Then thearginit
/freearg
constructs aren't needed, and the deallocation of the intermediate Python string could happen locally.