Source

pyyaml / ext / _yaml.h

Full commit
Kirill Simonov 349cb4f 
Kirill Simonov 5d8e6ae 
Kirill Simonov 349cb4f 
Kirill Simonov 664c38c 

Kirill Simonov 6c78d3a 
Kirill Simonov 664c38c 

Kirill Simonov e44368b 






#include <yaml.h>

#if PY_MAJOR_VERSION < 3

#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")

#else

#define PyString_CheckExact PyBytes_CheckExact
#define PyString_AS_STRING  PyBytes_AS_STRING
#define PyString_GET_SIZE   PyBytes_GET_SIZE
#define PyString_FromStringAndSize  PyBytes_FromStringAndSize

#endif