Browse Source

[1298] do not assume return value of PyBool_Check as (C++) bool; clang
complains about it.

JINMEI Tatuya 13 years ago
parent
commit
0f6b216a89
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/lib/dns/python/name_python.cc

+ 1 - 1
src/lib/dns/python/name_python.cc

@@ -286,7 +286,7 @@ Name_toText(s_Name* self, PyObject* args) {
     if (PyArg_ParseTuple(args, "|O", &omit_final_dot_obj)) {
         bool omit_final_dot = false;
         if (omit_final_dot_obj != NULL) {
-            if (PyBool_Check(omit_final_dot_obj)) {
+            if (PyBool_Check(omit_final_dot_obj) != 0) {
                 omit_final_dot = (omit_final_dot_obj == Py_True);
             } else {
                 PyErr_SetString(PyExc_TypeError,