BIND 10 trac2497, updated. 292db149be50cc3a38965be1e14ca1cf26cba2bb [2497] Make new_rdata_factory_users[] a list of tuples

BIND 10 source code commits bind10-changes at lists.isc.org
Mon Dec 3 05:25:24 UTC 2012


The branch, trac2497 has been updated
       via  292db149be50cc3a38965be1e14ca1cf26cba2bb (commit)
      from  8ab540a511481e83c8db435c439e291d0f3e52ea (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 292db149be50cc3a38965be1e14ca1cf26cba2bb
Author: Mukund Sivaraman <muks at isc.org>
Date:   Mon Dec 3 10:51:18 2012 +0530

    [2497] Make new_rdata_factory_users[] a list of tuples
    
    Also:
    * document new_rdata_factory_users[] with an example
    * Rename new_rdatafactory_users[] to new_rdata_factory_users[]

-----------------------------------------------------------------------

Summary of changes:
 src/lib/dns/gen-rdatacode.py.in |   15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/dns/gen-rdatacode.py.in b/src/lib/dns/gen-rdatacode.py.in
index 9f22582..a5f6277 100755
--- a/src/lib/dns/gen-rdatacode.py.in
+++ b/src/lib/dns/gen-rdatacode.py.in
@@ -24,11 +24,20 @@ from os.path import getmtime
 import re
 import sys
 
+# new_rdata_factory_users[] is a list of tuples of the form (rrtype,
+# rrclass). Items in the list use the (new) RdataFactory class, and
+# items which are not in the list use OldRdataFactory class.
+# Note: rrtype and rrclass must be specified in lowercase in
+# new_rdata_factory_users.
+#
+# Example:
+#     new_rdata_factory_users = [('a', 'in'), ('a', 'ch')]
+new_rdata_factory_users = []
+
 re_typecode = re.compile('([\da-z]+)_(\d+)')
 classcode2txt = {}
 typecode2txt = {}
 typeandclass = []
-new_rdatafactory_users = []
 generic_code = 65536            # something larger than any code value
 rdata_declarations = ''
 class_definitions = ''
@@ -275,8 +284,8 @@ def generate_rrparam(fileprefix, basemtime):
 
         # By default, we use OldRdataFactory (see bug #2497). If you
         # want to pick RdataFactory for a particular type, add it to
-        # new_rdatafactory_users.
-        if type_txt in new_rdatafactory_users:
+        # new_rdata_factory_users.
+        if (type_txt.lower(), class_txt.lower()) in new_rdata_factory_users:
             rdf_class = 'RdataFactory'
         else:
             rdf_class = 'OldRdataFactory'



More information about the bind10-changes mailing list