BIND 10 #317: suggested cleanups for the python bindings of libdns++

BIND 10 Development do-not-reply at isc.org
Tue Oct 19 11:35:12 UTC 2010


#317: suggested cleanups for the python bindings of libdns++
--------------------------------+-------------------------------------------
      Reporter:  jinmei         |        Owner:  jinmei               
          Type:  enhancement    |       Status:  new                  
      Priority:  minor          |    Milestone:  y2 12 month milestone
     Component:  DNSPacket API  |   Resolution:                       
      Keywords:                 |    Sensitive:  0                    
Estimatedhours:  0.0            |        Hours:  0                    
      Billable:  1              |   Totalhours:  0                    
      Internal:  0              |  
--------------------------------+-------------------------------------------
Changes (by jinmei):

  * milestone:  y2 6 month milestone => y2 12 month milestone


Comment:

 Another point: to build a python object of our own, it's probably better
 to use PyObject_New() than doing like this:

 {{{
 static PyObject*
 RRset_getName(s_RRset* self) {
     s_Name* name;

     // is this the best way to do this?
     name = static_cast<s_Name*>(name_type.tp_alloc(&name_type, 0));
 }}}

 This could be:

 {{{
 static PyObject*
 RRset_getName(s_RRset* self) {
     s_Name* name = PyObject_New(s_Name, &name_type);
 }}}

-- 
Ticket URL: <https://bind10.isc.org/ticket/317#comment:5>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list