BIND 10 trac749, updated. dbe0eeebf72c420712555c522be6d25ea857f7c1 [trac749] update gen-rdatacode python script

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Apr 12 15:34:32 UTC 2011


The branch, trac749 has been updated
       via  dbe0eeebf72c420712555c522be6d25ea857f7c1 (commit)
      from  ff81e1bf773d5d18656f75ed144f278cc0734a88 (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 dbe0eeebf72c420712555c522be6d25ea857f7c1
Author: chenzhengzhang <jerry.zzpku at gmail.com>
Date:   Tue Apr 12 23:33:45 2011 +0800

    [trac749]  update gen-rdatacode python script

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

Summary of changes:
 src/lib/dns/gen-rdatacode.py.in |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/dns/gen-rdatacode.py.in b/src/lib/dns/gen-rdatacode.py.in
index 04e5c6a..8eb3235 100755
--- a/src/lib/dns/gen-rdatacode.py.in
+++ b/src/lib/dns/gen-rdatacode.py.in
@@ -86,6 +86,13 @@ def import_classheader(class_txt, type_txt, type_code, file):
             continue
         if re.match('// BEGIN_ISC_NAMESPACE', line):
             content += 'namespace isc {\n'
+            content += 'namespace util {\n'
+            content += 'namespace io {'
+            content += '''
+class InputBuffer;
+class OutputBuffer;\n'''
+            content += '}\n'
+            content += '}\n\n'
             content += 'namespace dns {\n'
             continue
         if re.match('// BEGIN_RDATA_NAMESPACE', line):
@@ -105,16 +112,14 @@ def import_classheader(class_txt, type_txt, type_code, file):
         content += line
         if re.match('// BEGIN_COMMON_DECLARATIONS', line):
             content += '''
-class InputBuffer;
-class OutputBuffer;
 class MessageRenderer;\n\n'''
         if re.match('\s+// BEGIN_COMMON_MEMBERS$', line):
             content += '''
     explicit ''' + type_utxt + '''(const std::string& type_str);
-    ''' + type_utxt + '''(InputBuffer& buffer, size_t rdata_len);
+    ''' + type_utxt + '''(isc::util::io::InputBuffer& buffer, size_t rdata_len);
     ''' + type_utxt + '''(const ''' + type_utxt + '''& other);
     virtual std::string toText() const;
-    virtual void toWire(OutputBuffer& buffer) const;
+    virtual void toWire(isc::util::io::OutputBuffer& buffer) const;
     virtual void toWire(MessageRenderer& renderer) const;
     virtual int compare(const Rdata& other) const;\n\n'''
     rdata_header.close()




More information about the bind10-changes mailing list