diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2023-10-03 15:02:38 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2023-10-03 16:04:35 +0300 |
commit | 5478b8f55cc7055a4861c4030e0c401b5c72714c (patch) | |
tree | 3d003e5b4c1800297fcc491faffc9a006d174289 /library/cpp/pybind/v2.cpp | |
parent | ca778ad9bfb31839b0f05a4995753bc61db648ad (diff) | |
download | ydb-5478b8f55cc7055a4861c4030e0c401b5c72714c.tar.gz |
Intermediate changes
Diffstat (limited to 'library/cpp/pybind/v2.cpp')
-rw-r--r-- | library/cpp/pybind/v2.cpp | 43 |
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 |