From 3334684ed64e93b35a6ca00a4ac801076a9bea08 Mon Sep 17 00:00:00 2001 From: Kishan-Ved Date: Tue, 7 May 2024 21:55:09 +0530 Subject: [PATCH] removed _trees import error --- pydatastructs/trees/_backend/cpp/s | 0 pydatastructs/trees/_backend/cpp/trees/binary_search_tree.hpp | 2 +- pydatastructs/trees/_backend/cpp/trees/trees.cpp | 2 +- pydatastructs/trees/binary_trees.py | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 pydatastructs/trees/_backend/cpp/s diff --git a/pydatastructs/trees/_backend/cpp/s b/pydatastructs/trees/_backend/cpp/s new file mode 100644 index 000000000..e69de29bb diff --git a/pydatastructs/trees/_backend/cpp/trees/binary_search_tree.hpp b/pydatastructs/trees/_backend/cpp/trees/binary_search_tree.hpp index d00f0266c..7c57d6690 100644 --- a/pydatastructs/trees/_backend/cpp/trees/binary_search_tree.hpp +++ b/pydatastructs/trees/_backend/cpp/trees/binary_search_tree.hpp @@ -369,7 +369,7 @@ static PyTypeObject BinarySearchTreeType = { 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ - BinarySearchTree_new, /* tp_new */ + BinarySearchTree___new__, /* tp_new */ }; // Module definition for the binarysearchtree module diff --git a/pydatastructs/trees/_backend/cpp/trees/trees.cpp b/pydatastructs/trees/_backend/cpp/trees/trees.cpp index 3ab1d610e..93bcd6ee3 100644 --- a/pydatastructs/trees/_backend/cpp/trees/trees.cpp +++ b/pydatastructs/trees/_backend/cpp/trees/trees.cpp @@ -4,7 +4,7 @@ static struct PyModuleDef trees_struct = { PyModuleDef_HEAD_INIT, "_trees", - NULL, + 0, -1, NULL }; diff --git a/pydatastructs/trees/binary_trees.py b/pydatastructs/trees/binary_trees.py index 65450db75..5943594e7 100644 --- a/pydatastructs/trees/binary_trees.py +++ b/pydatastructs/trees/binary_trees.py @@ -4,9 +4,9 @@ from pydatastructs.miscellaneous_data_structures import Stack from pydatastructs.linear_data_structures import OneDimensionalArray from pydatastructs.linear_data_structures.arrays import ArrayForTrees -from pydatastructs.trees._backend.cpp import _trees from pydatastructs.utils.misc_util import ( Backend, raise_if_backend_is_not_python) +from pydatastructs.trees._backend.cpp import _trees __all__ = [ 'AVLTree',