_ruamel_yaml.h 476 B

1234567891011121314151617181920212223
  1. #include "yaml.h"
  2. #if PY_MAJOR_VERSION < 3
  3. #define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
  4. #else
  5. #define PyString_CheckExact PyBytes_CheckExact
  6. #define PyString_AS_STRING PyBytes_AS_STRING
  7. #define PyString_GET_SIZE PyBytes_GET_SIZE
  8. #define PyString_FromStringAndSize PyBytes_FromStringAndSize
  9. #endif
  10. #ifdef _MSC_VER /* MS Visual C++ 6.0 */
  11. #if _MSC_VER == 1200
  12. #define PyLong_FromUnsignedLongLong(z) PyInt_FromLong(i)
  13. #endif
  14. #endif