BIND 10 #934: use real constants (instead of proxy factory) in pydnspp
BIND 10 Development
do-not-reply at isc.org
Tue May 17 07:36:07 UTC 2011
#934: use real constants (instead of proxy factory) in pydnspp
-------------------------------------+-------------------------------------
Reporter: jinmei | Owner:
Type: enhancement | jinmei
Priority: major | Status: new
Component: DNSPacket | Milestone: New
API | Tasks
Sensitive: 0 | Keywords:
Sub-Project: DNS | Defect Severity: N/A
Estimated Difficulty: 0 | Feature Depending on Ticket:
Total Hours: 0 | Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
I noticed that pydnspp uses many proxy factory functions for constant
objects like RRType.AAAA(), RRClass.IN(). In Python we don't have to
do that because there's no worry for static initialization fiasco
(which is the reason why we use the proxy functions in C++).
We can simply define RRType.AAAA, etc, as class constant in
initialization and use it throughout our applications. That will be
more intuitive, and will be a bit more efficient (a call to a proxy
function always involve an allocation of PyObject and subsequent
deallocation; real constants are created only once in initialization).
I'd propose making this change in the entire pydnspp. It will require
changes to the applications (xfrin.py, etc), but the changes should be
pretty straightforward.
--
Ticket URL: <http://bind10.isc.org/ticket/934>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list