2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-27 19:12:16 +00:00

added forgotten array_object_manager_traits::get_pytype

[SVN r40889]
This commit is contained in:
Nikolay Mladenov
2007-11-07 16:06:55 +00:00
parent d303ea16fc
commit e14c702a40
3 changed files with 8 additions and 1 deletions

View File

@@ -92,6 +92,7 @@ namespace aux
{
static bool check(PyObject* obj);
static detail::new_non_null_reference adopt(PyObject* obj);
static PyTypeObject const* get_pytype() ;
};
} // namespace aux

View File

@@ -114,6 +114,12 @@ namespace aux
pytype_check(downcast<PyTypeObject>(array_type.get()), obj));
}
PyTypeObject const* array_object_manager_traits::get_pytype()
{
load(false);
if(!array_type) return 0;
return handle<PyTypeObject>(array_type).get();
}
# define BOOST_PYTHON_AS_OBJECT(z, n, _) object(x##n)
# define BOOST_PP_LOCAL_MACRO(n) \

View File

@@ -16,7 +16,7 @@ using namespace boost::python;
#endif
// See if we can invoke array() from C++
object new_array()
numeric::array new_array()
{
return numeric::array(
make_tuple(