diff options
author | kkhamitov <kkhamitov@yandex-team.ru> | 2022-02-10 16:49:19 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:19 +0300 |
commit | c8c0985466696c87722fd656d897925f14e25934 (patch) | |
tree | 80a2a015919028aa17382cab5af3ed2a040ffa66 /library/cpp | |
parent | f31097c96270919a1f49360bdaaa69ea4f3fefab (diff) | |
download | ydb-c8c0985466696c87722fd656d897925f14e25934.tar.gz |
Restoring authorship annotation for <kkhamitov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp')
-rw-r--r-- | library/cpp/yson/node/pybind/node.cpp | 18 | ||||
-rw-r--r-- | library/cpp/yson/node/pybind/node.h | 4 | ||||
-rw-r--r-- | library/cpp/yson/node/pybind/ya.make | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/library/cpp/yson/node/pybind/node.cpp b/library/cpp/yson/node/pybind/node.cpp index 79beba3647..f44aca1fc5 100644 --- a/library/cpp/yson/node/pybind/node.cpp +++ b/library/cpp/yson/node/pybind/node.cpp @@ -49,21 +49,21 @@ namespace NPyBind { res = 0.0; return FromPyObject(obj, res.As<double>()); } -#if PY_MAJOR_VERSION < 3 +#if PY_MAJOR_VERSION < 3 if (PyString_Check(obj)) { res = TString(); return FromPyObject(obj, res.As<TString>()); } -#else - if (PyUnicode_Check(obj)) { - res = TString(); - return FromPyObject(obj, res.As<TString>()); - } +#else + if (PyUnicode_Check(obj)) { + res = TString(); + return FromPyObject(obj, res.As<TString>()); + } if (PyBytes_Check(obj)) { res = TString(); return FromPyObject(obj, res.As<TString>()); } -#endif +#endif if (PyList_Check(obj)) { res = NYT::TNode::CreateList(); return FromPyObject(obj, res.AsList()); @@ -72,7 +72,7 @@ namespace NPyBind { res = NYT::TNode::CreateMap(); return FromPyObject(obj, res.AsMap()); } -#if PY_MAJOR_VERSION < 3 +#if PY_MAJOR_VERSION < 3 if (PyInt_Check(obj)) { auto valAsLong = PyInt_AsLong(obj); if (valAsLong == -1 && PyErr_Occurred()) { @@ -81,7 +81,7 @@ namespace NPyBind { res = valAsLong; return true; } -#endif +#endif if (PyLong_Check(obj)) { int overflow = 0; auto valAsLong = PyLong_AsLongAndOverflow(obj, &overflow); diff --git a/library/cpp/yson/node/pybind/node.h b/library/cpp/yson/node/pybind/node.h index 65f7236de6..b1475b1581 100644 --- a/library/cpp/yson/node/pybind/node.h +++ b/library/cpp/yson/node/pybind/node.h @@ -1,7 +1,7 @@ #pragma once -#include <Python.h> - +#include <Python.h> + #include <library/cpp/yson/node/node.h> namespace NYT { diff --git a/library/cpp/yson/node/pybind/ya.make b/library/cpp/yson/node/pybind/ya.make index 97b7583e96..eb3eb7a62d 100644 --- a/library/cpp/yson/node/pybind/ya.make +++ b/library/cpp/yson/node/pybind/ya.make @@ -1,4 +1,4 @@ -PY23_NATIVE_LIBRARY() +PY23_NATIVE_LIBRARY() OWNER( inngonch |