ssize_t.hpp 735 B

1234567891011121314151617181920212223242526272829
  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. #ifndef BOOST_PYTHON_SSIZE_T_RWGK20060924_HPP
  6. # define BOOST_PYTHON_SSIZE_T_RWGK20060924_HPP
  7. # include <boost/python/detail/prefix.hpp>
  8. namespace boost { namespace python {
  9. #if PY_VERSION_HEX >= 0x02050000
  10. typedef Py_ssize_t ssize_t;
  11. ssize_t const ssize_t_max = PY_SSIZE_T_MAX;
  12. ssize_t const ssize_t_min = PY_SSIZE_T_MIN;
  13. #else
  14. typedef int ssize_t;
  15. ssize_t const ssize_t_max = INT_MAX;
  16. ssize_t const ssize_t_min = INT_MIN;
  17. #endif
  18. }} // namespace boost::python
  19. #endif // BOOST_PYTHON_SSIZE_T_RWGK20060924_HPP