py27_backports.h 623 B

1234567891011121314151617181920212223242526
  1. #pragma once
  2. #include "Python.h"
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. // Declare functions which are to be backported
  7. // (see details about need for backports in ya.make)
  8. int _PySlice_Unpack(PyObject *slice,
  9. Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step);
  10. Py_ssize_t _PySlice_AdjustIndices(Py_ssize_t length,
  11. Py_ssize_t *start, Py_ssize_t *stop,
  12. Py_ssize_t step);
  13. // Declare py23 compatible names
  14. #define PySlice_Unpack _PySlice_Unpack
  15. #define PySlice_AdjustIndices _PySlice_AdjustIndices
  16. #ifdef __cplusplus
  17. }
  18. #endif