find_instance.hpp 844 B

123456789101112131415161718192021
  1. // Copyright David Abrahams 2002.
  2. // Distributed under the Boost Software License, Version 1.0. (See
  3. // accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. #ifndef FIND_INSTANCE_DWA2002312_HPP
  6. # define FIND_INSTANCE_DWA2002312_HPP
  7. # include <boost/python/type_id.hpp>
  8. namespace boost { namespace python { namespace objects {
  9. // Given a type_id, find the instance data which corresponds to it, or
  10. // return 0 in case no such type is held. If null_shared_ptr_only is
  11. // true and the type being sought is a shared_ptr, only find an
  12. // instance if it turns out to be NULL. Needed for shared_ptr rvalue
  13. // from_python support.
  14. BOOST_PYTHON_DECL void* find_instance_impl(PyObject*, type_info, bool null_shared_ptr_only = false);
  15. }}} // namespace boost::python::objects
  16. #endif // FIND_INSTANCE_DWA2002312_HPP