1 [section boost/python/long.hpp]
3 Exposes a [link concepts.objectwrapper.typewrapper_concept_requirements TypeWrapper] for the Python [@http://www.python.org/doc/current/lib/typesnumeric.html long] integer type.
5 [section Class `long_`]
6 Exposes the [@http://www.python.org/doc/current/lib/typesnumeric.html numeric type protocol] of Python's built-in `long` type. The semantics of the constructors and member functions defined below can be fully understood by reading the [link concepts.objectwrapper.typewrapper_concept_requirements TypeWrapper] concept definition. Since `long_` is publicly derived from [link object_wrappers.boost_python_object_hpp.class_object `object`], the public `object` interface applies to `long_` instances as well.
8 namespace boost { namespace python
10 class long_ : public object
16 explicit long_(T const& rhs);
18 template <class T, class U>
19 long_(T const& rhs, U const& base);
26 namespace python = boost::python;
28 // compute a factorial without overflowing
29 python::long_ fact(long n)
32 return python::long_(1);
34 return n * fact(n - 1);