Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/python/src/long.cpp @ 33

Last change on this file since 33 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 1.0 KB
Line 
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#include <boost/python/long.hpp>
6
7namespace boost { namespace python { namespace detail {
8
9new_non_null_reference long_base::call(object const& arg_)
10{
11    return (detail::new_non_null_reference)PyObject_CallFunction(
12        (PyObject*)&PyLong_Type, "(O)", 
13        arg_.ptr());
14}
15
16new_non_null_reference long_base::call(object const& arg_, object const& base)
17{
18    return (detail::new_non_null_reference)PyObject_CallFunction(
19        (PyObject*)&PyLong_Type, "(OO)", 
20        arg_.ptr(), base.ptr());
21}
22
23long_base::long_base()
24    : object(
25        detail::new_reference(
26            PyObject_CallFunction((PyObject*)&PyLong_Type, "()"))
27        )
28{}
29
30long_base::long_base(object_cref arg)
31    : object(long_base::call(arg))
32{}
33
34long_base::long_base(object_cref arg, object_cref base)
35    : object(long_base::call(arg, base))
36{}
37
38
39}}} // namespace boost::python
Note: See TracBrowser for help on using the repository browser.