NLnetLabs / ldns

LDNS is a DNS library that facilitates DNS tool programming
https://nlnetlabs.nl/ldns
BSD 3-Clause "New" or "Revised" License
285 stars 94 forks source link

SWIG_Python_str_AsChar removal in SWIG 4.2.0 #232

Closed fweimer-rh closed 5 days ago

fweimer-rh commented 5 months ago

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.