diff options
Diffstat (limited to 'ext/_yaml.h')
-rw-r--r-- | ext/_yaml.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/_yaml.h b/ext/_yaml.h index d8070e5..b39292d 100644 --- a/ext/_yaml.h +++ b/ext/_yaml.h @@ -1,3 +1,11 @@ #include <yaml.h> +#if PY_MAJOR_VERSION >= 3 + +#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 |