BIND 10 trac915, updated. 7a6f36fc9073def2a531a4090b97d223d5a5c69d [trac915] some additional cleanups: - mae sure separate python binding .cc files include Python.h at its head (failing so would caused build failure on some systems) - updated the template in uitl/python regarding Python.h - corrected a copyright year - removed unnecessary EXTRA_DIST (some are now listed as source)
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri May 13 22:37:45 UTC 2011
The branch, trac915 has been updated
via 7a6f36fc9073def2a531a4090b97d223d5a5c69d (commit)
from 3bb68553bb39502b749265542c5b6d36ad80e32d (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 7a6f36fc9073def2a531a4090b97d223d5a5c69d
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Fri May 13 15:35:34 2011 -0700
[trac915] some additional cleanups:
- mae sure separate python binding .cc files include Python.h at its head
(failing so would caused build failure on some systems)
- updated the template in uitl/python regarding Python.h
- corrected a copyright year
- removed unnecessary EXTRA_DIST (some are now listed as source)
-----------------------------------------------------------------------
Summary of changes:
src/lib/dns/python/Makefile.am | 5 -----
src/lib/dns/python/name_python.cc | 2 ++
src/lib/dns/python/tests/tsig_python_test.py | 2 +-
src/lib/dns/python/tsig_rdata_python.cc | 2 ++
src/lib/util/python/wrapper_template.cc | 8 ++++++++
5 files changed, 13 insertions(+), 6 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/dns/python/Makefile.am b/src/lib/dns/python/Makefile.am
index 2e87d8f..005bbfc 100644
--- a/src/lib/dns/python/Makefile.am
+++ b/src/lib/dns/python/Makefile.am
@@ -21,19 +21,14 @@ pydnspp_la_LDFLAGS = $(PYTHON_LDFLAGS)
# rules
EXTRA_DIST = pydnspp_common.h
EXTRA_DIST += edns_python.cc
-EXTRA_DIST += messagerenderer_python.cc
EXTRA_DIST += message_python.cc
EXTRA_DIST += rrclass_python.cc
-EXTRA_DIST += name_python.cc
EXTRA_DIST += opcode_python.cc
-EXTRA_DIST += rcode_python.cc
EXTRA_DIST += rrset_python.cc
EXTRA_DIST += question_python.cc
EXTRA_DIST += rrttl_python.cc
EXTRA_DIST += rdata_python.cc
EXTRA_DIST += rrtype_python.cc
-EXTRA_DIST += tsigkey_python.cc
-EXTRA_DIST += tsig_python.cc
# Python prefers .so, while some OSes (specifically MacOS) use a different
# suffix for dynamic objects. -module is necessary to work this around.
diff --git a/src/lib/dns/python/name_python.cc b/src/lib/dns/python/name_python.cc
index 37b33a6..d00c6f7 100644
--- a/src/lib/dns/python/name_python.cc
+++ b/src/lib/dns/python/name_python.cc
@@ -12,6 +12,8 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#include <Python.h>
+
#include <util/buffer.h>
#include <util/python/pycppwrapper_util.h>
diff --git a/src/lib/dns/python/tests/tsig_python_test.py b/src/lib/dns/python/tests/tsig_python_test.py
index 9ddef9b..7e5515d 100644
--- a/src/lib/dns/python/tests/tsig_python_test.py
+++ b/src/lib/dns/python/tests/tsig_python_test.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2010 Internet Systems Consortium.
+# Copyright (C) 2011 Internet Systems Consortium.
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
diff --git a/src/lib/dns/python/tsig_rdata_python.cc b/src/lib/dns/python/tsig_rdata_python.cc
index eebd5f1..be97e9d 100644
--- a/src/lib/dns/python/tsig_rdata_python.cc
+++ b/src/lib/dns/python/tsig_rdata_python.cc
@@ -12,6 +12,8 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#include <Python.h>
+
#include <string>
#include <stdexcept>
diff --git a/src/lib/util/python/wrapper_template.cc b/src/lib/util/python/wrapper_template.cc
index 1585a74..3b9d9e9 100644
--- a/src/lib/util/python/wrapper_template.cc
+++ b/src/lib/util/python/wrapper_template.cc
@@ -12,6 +12,14 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+// Enable this if you use s# variants with PyArg_ParseTuple(), see
+// http://docs.python.org/py3k/c-api/arg.html#strings-and-buffers
+//#define PY_SSIZE_T_CLEAN
+
+// Python.h needs to be placed at the head of the program file, see:
+// http://docs.python.org/py3k/extending/extending.html#a-simple-example
+#include <Python.h>
+
#include <string>
#include <stdexcept>
More information about the bind10-changes
mailing list