Skip to content

Commit 0cba5b4

Browse files
committed
removed many errors
1 parent eb602e6 commit 0cba5b4

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

pydatastructs/linear_data_structures/_backend/cpp/arrays/ArrayForTrees.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static PyObject* ArrayForTrees__modify(ArrayForTrees *self) {
6464
self->_dynamic_one_dimensional_array->_one_dimensional_array->_data = arr_new;
6565
self->_dynamic_one_dimensional_array->_size = new_size;
6666
self->_size = new_size;
67-
// return reinterpret_cast<PyObject*>(new_indices); // Works except for this
67+
return reinterpret_cast<PyObject*>(new_indices); // Works except for this
6868
}
6969
Py_INCREF(Py_None);
7070
return Py_None;

pydatastructs/trees/_backend/cpp/BinaryTree.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ static PyObject* BinaryTree___new__(PyTypeObject* type, PyObject *args, PyObject
4949

5050
// obj.tree= ArrayForTrees(TreeNode, [root])
5151
PyObject* listroot = Py_BuildValue("[i]", root);
52-
// self->tree = ArrayForTrees(&TreeNodeType, listroot); // check if this is correct
52+
self->tree = ArrayForTrees(&TreeNodeType, listroot); // check if this is correct
5353
self->size = 1;
5454

55-
// if(comp == Py_None){
56-
// self->comparator = PyObject_RichCompare(PyObject *key1, PyObject *key2, Py_LT); // lambda functions, check how to do this
57-
// }
58-
// else{
59-
// self->comparator = comp;
60-
// }
55+
if(comp == Py_None){
56+
self->comparator = PyObject_RichCompare(PyObject *key1, PyObject *key2, Py_LT); // lambda functions, check how to do this
57+
}
58+
else{
59+
self->comparator = comp;
60+
}
6161
self->is_order_statistic = is_order_statistic;
6262

6363
return reinterpret_cast<PyObject*>(self);

0 commit comments

Comments
 (0)