Commit 27369e24 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[master] place internal exception class in a separate namespace.

this is the same workaround with particular versions of clang++ (on a
particular instance of OS X box) as that we did for isc.log wrapper.
committing it at my discretion.
parent 7800a308
...@@ -65,12 +65,17 @@ namespace dns { ...@@ -65,12 +65,17 @@ namespace dns {
namespace python { namespace python {
namespace internal { namespace internal {
namespace { // Place the exception class in a named namespace to avoid weird run time
// failure with clang++. See isc.log Python wrapper.
namespace clang_unnamed_namespace_workaround {
// This is used to abort check_zone() and go back to the top level. // This is used to abort check_zone() and go back to the top level.
// We use a separate exception so it won't be caught in the middle. // We use a separate exception so it won't be caught in the middle.
class InternalException : public std::exception { class InternalException : public std::exception {
}; };
}
using namespace clang_unnamed_namespace_workaround;
namespace {
// This is a "wrapper" RRsetCollection subclass. It's constructed with // This is a "wrapper" RRsetCollection subclass. It's constructed with
// a Python RRsetCollection object, and its find() calls the Python version // a Python RRsetCollection object, and its find() calls the Python version
// of RRsetCollection.find(). This way, the check_zone() wrapper will work // of RRsetCollection.find(). This way, the check_zone() wrapper will work
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment