[ldns-users] decoupling rr and rdf in the python wrapper
Bedrich Kosata
bedrich.kosata at nic.cz
Thu May 5 09:04:48 UTC 2011
Hi,
as I wrote some time ago, there is still a problem with the ldns Python
wrapper, because an RR shares its data with the included RDF and if the
RDF is stored in a variable and the RR is garbage collected, the RDF
data is no longer available.
I attach two scripts that demonstrate this problem (one gives empty RDF
instead of the actual data and one segfaults).
I also attach a patch which clones all RDFs when retreived from an RR
and also when RDF is set to an RR. This should decouple the RDF and RR
data completely in the Python wrapper, thus making it possible for the
objects to be garbage collected in any order at any time.
Best regards
Beda
p.s.- as with the patch in the previous email, the patch is against the
current svn version.
--
Bedrich Kosata
CZ.NIC Labs <http://labs.nic.cz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ldns_rr_rdf_decoupling.patch
Type: text/x-patch
Size: 21456 bytes
Desc: not available
URL: <http://lists.nlnetlabs.nl/pipermail/ldns-users/attachments/20110505/87568b16/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-rrlist-get-rdf.py
Type: text/x-python
Size: 533 bytes
Desc: not available
URL: <http://lists.nlnetlabs.nl/pipermail/ldns-users/attachments/20110505/87568b16/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-set-owner.new2.py
Type: text/x-python
Size: 256 bytes
Desc: not available
URL: <http://lists.nlnetlabs.nl/pipermail/ldns-users/attachments/20110505/87568b16/attachment-0001.py>
More information about the ldns-users
mailing list