We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 14d2bae commit 52ba3c7Copy full SHA for 52ba3c7
1 file changed
include/boost/python/errors.hpp
@@ -35,17 +35,17 @@ inline void handle_exception()
35
handle_exception(detail::rethrow);
36
}
37
38
-BOOST_PYTHON_DECL PyObject* expect_non_null_impl(PyObject* x);
+BOOST_PYTHON_DECL void throw_argument_error();
39
+BOOST_PYTHON_DECL void throw_error_already_set();
40
41
template <class T>
42
inline T* expect_non_null(T* x)
43
{
- return (T*)expect_non_null_impl((PyObject*)x);
44
+ if (x == 0)
45
+ throw_error_already_set();
46
+ return x;
47
48
-BOOST_PYTHON_DECL void throw_argument_error();
-BOOST_PYTHON_DECL void throw_error_already_set();
-
49
}} // namespace boost::python
50
51
#endif // ERRORS_DWA052500_H_
0 commit comments