Skip to content

Commit 2b52210

Browse files
committed
remove (again!) extra diagnostic info
[SVN r19281]
1 parent 96a7bce commit 2b52210

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/object/function.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
#include <algorithm>
2525
#include <cstring>
2626

27-
#include <stdio.h>
27+
#if BOOST_PYTHON_DEBUG_ERROR_MESSAGES
28+
# include <cstdio>
29+
#endif
2830

2931
namespace boost { namespace python { namespace objects {
3032

@@ -224,7 +226,9 @@ void function::argument_error(PyObject* args, PyObject* keywords) const
224226

225227
message += str("\n ").join(signatures);
226228

227-
printf("\n--------\n%s\n--------\n", extract<const char*>(message)());
229+
#if BOOST_PYTHON_DEBUG_ERROR_MESSAGES
230+
std::printf("\n--------\n%s\n--------\n", extract<const char*>(message)());
231+
#endif
228232
PyErr_SetObject(exception.get(), message.ptr());
229233
throw_error_already_set();
230234
}

0 commit comments

Comments
 (0)