From 2b522102916b8d189acbcc648ba81bd6bdd6f1f5 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Wed, 23 Jul 2003 14:14:00 +0000 Subject: [PATCH] remove (again!) extra diagnostic info [SVN r19281] --- src/object/function.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/object/function.cpp b/src/object/function.cpp index 76a9df51..a90591d2 100644 --- a/src/object/function.cpp +++ b/src/object/function.cpp @@ -24,7 +24,9 @@ #include #include -#include +#if BOOST_PYTHON_DEBUG_ERROR_MESSAGES +# include +#endif namespace boost { namespace python { namespace objects { @@ -224,7 +226,9 @@ void function::argument_error(PyObject* args, PyObject* keywords) const message += str("\n ").join(signatures); - printf("\n--------\n%s\n--------\n", extract(message)()); +#if BOOST_PYTHON_DEBUG_ERROR_MESSAGES + std::printf("\n--------\n%s\n--------\n", extract(message)()); +#endif PyErr_SetObject(exception.get(), message.ptr()); throw_error_already_set(); }