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 | 11c7da3bf8b14be64b7ddaf62ac657d4d2992b33 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 | |
parent | c8c0985466696c87722fd656d897925f14e25934 (diff) | |
download | ydb-11c7da3bf8b14be64b7ddaf62ac657d4d2992b33.tar.gz |
Restoring authorship annotation for <kkhamitov@yandex-team.ru>. Commit 2 of 2.
-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 f44aca1fc5..79beba3647 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 b1475b1581..65f7236de6 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 eb3eb7a62d..97b7583e96 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 |