BIND 10 master, updated. ed780cbba41428341c5956ff5b032d829d059cab [master] Fix Python API compatibility issue with CPython < 3.3.0
BIND 10 source code commits
bind10-changes at lists.isc.org
Sun Jun 30 18:43:27 UTC 2013
The branch, master has been updated
via ed780cbba41428341c5956ff5b032d829d059cab (commit)
from dc6150ca4dd1d7dc44bcadb34acecb2d9176a9eb (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 ed780cbba41428341c5956ff5b032d829d059cab
Author: Mukund Sivaraman <muks at isc.org>
Date: Mon Jul 1 00:10:57 2013 +0530
[master] Fix Python API compatibility issue with CPython < 3.3.0
The 'p' format for booleans is not available before Python 3.3 API. So
we use the previously used fallback in these cases ('i' for C int).
-----------------------------------------------------------------------
Summary of changes:
.../isc/datasrc/configurableclientlist_python.cc | 7 +++++++
1 file changed, 7 insertions(+)
-----------------------------------------------------------------------
diff --git a/src/lib/python/isc/datasrc/configurableclientlist_python.cc b/src/lib/python/isc/datasrc/configurableclientlist_python.cc
index 5e56b18..a8c6d5f 100644
--- a/src/lib/python/isc/datasrc/configurableclientlist_python.cc
+++ b/src/lib/python/isc/datasrc/configurableclientlist_python.cc
@@ -165,8 +165,15 @@ ConfigurableClientList_getCachedZoneWriter(PyObject* po_self, PyObject* args) {
PyObject* name_obj;
int catch_load_error;
const char* datasrc_name_p = "";
+#if (PY_VERSION_HEX >= 0x030300f0)
+ // The 'p' specifier for predicate (boolean) is available from
+ // Python 3.3 (final) only.
if (PyArg_ParseTuple(args, "O!p|s", &isc::dns::python::name_type,
&name_obj, &catch_load_error, &datasrc_name_p)) {
+#else
+ if (PyArg_ParseTuple(args, "O!i|s", &isc::dns::python::name_type,
+ &name_obj, &catch_load_error, &datasrc_name_p)) {
+#endif
const isc::dns::Name&
name(isc::dns::python::PyName_ToName(name_obj));
const std::string datasrc_name(datasrc_name_p);
More information about the bind10-changes
mailing list