aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/pybind/v2.cpp
diff options
context:
space:
mode:
authorsay <say@yandex-team.com>2023-03-31 10:07:15 +0300
committersay <say@yandex-team.com>2023-03-31 10:07:15 +0300
commite163b69a87c70baac07bd99142916735e0c283fa (patch)
tree73e22c0f9e975ff6dc70f38534ec84588587d25c /library/cpp/pybind/v2.cpp
parent6be8bf780352147bcac5afec43505883b69229a0 (diff)
downloadydb-e163b69a87c70baac07bd99142916735e0c283fa.tar.gz
Swith flake8 to custom lint schema
Diffstat (limited to 'library/cpp/pybind/v2.cpp')
-rw-r--r--library/cpp/pybind/v2.cpp43
1 files changed, 0 insertions, 43 deletions
diff --git a/library/cpp/pybind/v2.cpp b/library/cpp/pybind/v2.cpp
deleted file mode 100644
index edce0be7195..00000000000
--- a/library/cpp/pybind/v2.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-#include "v2.h"
-namespace NPyBind {
- namespace Detail {
- template <>
- PyTypeObject* GetParentType<void>(const TPyModuleDefinition&) {
- return nullptr;
- }
-
-
- template <bool InitEnabled>
- void UpdateClassNamesInModule(TPyModuleDefinition& M, const TString& name, PyTypeObject* pythonType) {
- if (!InitEnabled) {
- return;
- }
- M.ClassName2Type[name] = pythonType;
- }
-
- template <bool InitEnabled>
- void UpdateGetContextInModule(TPyModuleDefinition& M, const TString& name, IGetContextBase* base) {
- if (!InitEnabled) {
- return;
- }
- M.Class2ContextGetter[name] = base;
- }
-
- TPyModuleRegistry::TPyModuleRegistry() {
-#if PY_MAJOR_VERSION >= 3
- NPrivate::AddFinalizationCallBack([this]() {
- if (UnnamedModule) {
- UnnamedModule.Clear();
- }
- Name2Def.clear();
- });
-#endif
- }
- template void UpdateClassNamesInModule<false>(TPyModuleDefinition& M, const TString& name, PyTypeObject* pythonType);
- template void UpdateClassNamesInModule<true>(TPyModuleDefinition& M, const TString& name, PyTypeObject* pythonType);
-
-
- template void UpdateGetContextInModule<false>(TPyModuleDefinition& M, const TString& name, IGetContextBase* pythonType);
- template void UpdateGetContextInModule<true>(TPyModuleDefinition& M, const TString& name, IGetContextBase* pythonType);
- }//Detail
-}//NPyBind