summaryrefslogtreecommitdiffstats
path: root/contrib/restricted/boost/python/src/slice.cpp
diff options
context:
space:
mode:
authorrobot-contrib <[email protected]>2022-09-17 10:02:06 +0300
committerrobot-contrib <[email protected]>2022-09-17 10:02:06 +0300
commit28dcdc0d65fba31bc1e2215741a4af228992938e (patch)
tree41862decccd7e31588bbf3b271f58c9624730512 /contrib/restricted/boost/python/src/slice.cpp
parent6d2819377bd78f50c415e809c9f0feae0d79fe9f (diff)
Update contrib/python/boto3/py3 to 1.24.75
Diffstat (limited to 'contrib/restricted/boost/python/src/slice.cpp')
-rw-r--r--contrib/restricted/boost/python/src/slice.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/contrib/restricted/boost/python/src/slice.cpp b/contrib/restricted/boost/python/src/slice.cpp
new file mode 100644
index 00000000000..ee55f948461
--- /dev/null
+++ b/contrib/restricted/boost/python/src/slice.cpp
@@ -0,0 +1,37 @@
+#include "boost/python/slice.hpp"
+
+// Copyright (c) 2004 Jonathan Brandmeyer
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+
+namespace boost { namespace python { namespace detail {
+
+slice_base::slice_base(PyObject* start, PyObject* stop, PyObject* step)
+ : object(detail::new_reference( PySlice_New(start, stop, step)))
+{
+}
+
+object
+slice_base::start() const
+{
+ return object( detail::borrowed_reference(
+ ((PySliceObject*)this->ptr())->start));
+}
+
+object
+slice_base::stop() const
+{
+ return object( detail::borrowed_reference(
+ ((PySliceObject*)this->ptr())->stop));
+}
+
+object
+slice_base::step() const
+{
+ return object( detail::borrowed_reference(
+ ((PySliceObject*)this->ptr())->step));
+}
+
+} } } // !namespace boost::python::detail