Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/python/src/slice.cpp @ 69

Last change on this file since 69 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

File size: 908 bytes
Line 
1#include "boost/python/slice.hpp"
2
3// Copyright (c) 2004 Jonathan Brandmeyer
4//  Use, modification and distribution are subject to the
5//  Boost Software License, Version 1.0. (See accompanying file
6//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7
8
9namespace boost { namespace python { namespace detail {
10
11slice_base::slice_base(PyObject* start, PyObject* stop, PyObject* step)
12  : object(detail::new_reference( PySlice_New(start, stop, step)))
13{
14}
15
16object
17slice_base::start() const
18{
19    return object( detail::borrowed_reference(
20        ((PySliceObject*)this->ptr())->start));
21}
22
23object
24slice_base::stop() const
25{
26    return object( detail::borrowed_reference(
27        ((PySliceObject*)this->ptr())->stop));
28}
29
30object
31slice_base::step() const
32{
33    return object( detail::borrowed_reference(
34        ((PySliceObject*)this->ptr())->step));
35}
36
37} } } // !namespace boost::python::detail
Note: See TracBrowser for help on using the repository browser.