• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright Ralf W. Grosse-Kunstleve & David Abrahams 2006.
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 
6 #ifndef BOOST_PYTHON_SSIZE_T_RWGK20060924_HPP
7 # define BOOST_PYTHON_SSIZE_T_RWGK20060924_HPP
8 
9 # include <boost/python/detail/prefix.hpp>
10 
11 namespace boost { namespace python {
12 
13 #if PY_VERSION_HEX >= 0x02050000
14 
15 typedef Py_ssize_t ssize_t;
16 ssize_t const ssize_t_max = PY_SSIZE_T_MAX;
17 ssize_t const ssize_t_min = PY_SSIZE_T_MIN;
18 
19 #else
20 
21 typedef int ssize_t;
22 ssize_t const ssize_t_max = INT_MAX;
23 ssize_t const ssize_t_min = INT_MIN;
24 
25 #endif
26 
27 }} // namespace boost::python
28 
29 #endif // BOOST_PYTHON_SSIZE_T_RWGK20060924_HPP
30