Commit 81ed5b01 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[2438] make sure cppobj is NULL in the base RRsetCollection wrapper classs.

parent 37a8e164
......@@ -70,8 +70,13 @@ RRsetCollectionBase_init(PyObject*, PyObject*, PyObject*) {
RRsetCollectionBase_destroy(PyObject* po_self) {
s_RRsetCollection* self = static_cast<s_RRsetCollection*>(po_self);
delete self->cppobj;
self->cppobj = NULL;
// Any C++-wrapper of derived RRsetCollection class should have its own
// destroy function (as it may manage cppobj in its own way);
// Python-only derived classes shouldn't set cppobj (which is
// 0-initialized). So this assertion must hold.
assert(self->cppobj == NULL);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment