diff options
author | Mikhail Borisov <borisov.mikhail@gmail.com> | 2022-02-10 16:45:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:39 +0300 |
commit | a6a92afe03e02795227d2641b49819b687f088f8 (patch) | |
tree | f6984a1d27d5a7ec88a6fdd6e20cd5b7693b6ece /contrib/python/PyYAML/py2/yaml/_yaml.h | |
parent | c6dc8b8bd530985bc4cce0137e9a5de32f1087cb (diff) | |
download | ydb-a6a92afe03e02795227d2641b49819b687f088f8.tar.gz |
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/PyYAML/py2/yaml/_yaml.h')
-rw-r--r-- | contrib/python/PyYAML/py2/yaml/_yaml.h | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/contrib/python/PyYAML/py2/yaml/_yaml.h b/contrib/python/PyYAML/py2/yaml/_yaml.h index 21fd6a991b..622cfc561a 100644 --- a/contrib/python/PyYAML/py2/yaml/_yaml.h +++ b/contrib/python/PyYAML/py2/yaml/_yaml.h @@ -1,23 +1,23 @@ - -#include <yaml.h> - -#if PY_MAJOR_VERSION < 3 - + +#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 - -#ifdef _MSC_VER /* MS Visual C++ 6.0 */ -#if _MSC_VER == 1200 - -#define PyLong_FromUnsignedLongLong(z) PyInt_FromLong(i) - -#endif -#endif + +#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 + +#ifdef _MSC_VER /* MS Visual C++ 6.0 */ +#if _MSC_VER == 1200 + +#define PyLong_FromUnsignedLongLong(z) PyInt_FromLong(i) + +#endif +#endif |