summaryrefslogtreecommitdiffstats
path: root/library/cpp/pybind/v2.cpp
diff options
context:
space:
mode:
authoralevitskii <[email protected]>2025-09-02 06:57:05 +0300
committeralevitskii <[email protected]>2025-09-02 07:19:27 +0300
commit7e399723cf6d967e20c8f9d2ee975426636242c5 (patch)
treeabd5283daba11c07afc8fc16f02aec2c19e2272a /library/cpp/pybind/v2.cpp
parent14e9c865541d5abe545cb496c0143e4905b00c78 (diff)
Drop LINTER param from styling macroses and cleanup deps
Drop LINTER param from styling macroses commit_hash:00dd2e2ee103e509cff38f520d4779974abe39a7
Diffstat (limited to 'library/cpp/pybind/v2.cpp')
-rw-r--r--library/cpp/pybind/v2.cpp53
1 files changed, 0 insertions, 53 deletions
diff --git a/library/cpp/pybind/v2.cpp b/library/cpp/pybind/v2.cpp
deleted file mode 100644
index 221b956801b..00000000000
--- a/library/cpp/pybind/v2.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-#include "v2.h"
-namespace NPyBind {
- namespace Detail {
-
- TVector<PyTypeObject*> GetParentTypes(const TVector<TParentData>& parentsData) {
- TVector<PyTypeObject*> res;
- Transform(
- parentsData.begin(),
- parentsData.end(),
- back_inserter(res),
- [](const TParentData& el) { return el.ParentType; }
- );
- return res;
- }
-
- TString DefaultParentResolver(const TString&, const THashSet<TString>& parentModules) {
- return *parentModules.begin();
- }
-
- 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