@@ -103,7 +103,7 @@ static PyObject* BinarySearchTree_search(BinarySearchTree* self, PyObject* args,
103
103
PyErr_SetString (PyExc_ValueError, " comparator should be callable" );
104
104
return NULL ;
105
105
}
106
- PyObject* arguments = Py_BuildValue (" OO " , key, curr_key);
106
+ PyObject* arguments = Py_BuildValue (" (OO) " , key, curr_key);
107
107
PyObject* res = PyObject_CallObject (bt->comparator , arguments);
108
108
Py_DECREF (arguments);
109
109
if (!PyLong_Check (res)) {
@@ -125,7 +125,7 @@ static PyObject* BinarySearchTree_search(BinarySearchTree* self, PyObject* args,
125
125
return walk;
126
126
}
127
127
else {
128
- return Py_BuildValue (" OO " ,walk,parent);
128
+ return Py_BuildValue (" (OO) " ,walk,parent);
129
129
}
130
130
Py_RETURN_NONE; // dummy return statement, never executed
131
131
}
@@ -168,7 +168,7 @@ static PyObject* BinarySearchTree_insert(BinarySearchTree* self, PyObject* args)
168
168
PyErr_SetString (PyExc_ValueError, " comparator should be callable" );
169
169
return NULL ;
170
170
}
171
- PyObject* arguments = Py_BuildValue (" OO " , key, curr_key);
171
+ PyObject* arguments = Py_BuildValue (" (OO) " , key, curr_key);
172
172
PyObject* cres = PyObject_CallObject (bt->comparator , arguments);
173
173
Py_DECREF (arguments);
174
174
if (!PyLong_Check (cres)) {
@@ -359,7 +359,7 @@ static PyObject* BinarySearchTree__bound_helper(BinarySearchTree* self, PyObject
359
359
PyErr_SetString (PyExc_ValueError, " comparator should be callable" );
360
360
return NULL ;
361
361
}
362
- PyObject* arguments = Py_BuildValue (" OO " , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (node_idx)])->key , bound_key);
362
+ PyObject* arguments = Py_BuildValue (" (OO) " , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (node_idx)])->key , bound_key);
363
363
PyObject* cres = PyObject_CallObject (bt->comparator , arguments);
364
364
Py_DECREF (arguments);
365
365
if (!PyLong_Check (cres)) {
@@ -481,7 +481,7 @@ static PyObject* BinarySearchTree__lca_2(BinarySearchTree* self, PyObject* args)
481
481
PyErr_SetString (PyExc_ValueError, " comparator should be callable" );
482
482
return NULL ;
483
483
}
484
- PyObject* arguments1 = Py_BuildValue (" OO " , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (u)])->key , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (curr_root)])->key );
484
+ PyObject* arguments1 = Py_BuildValue (" (OO) " , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (u)])->key , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (curr_root)])->key );
485
485
PyObject* cres1 = PyObject_CallObject (bt->comparator , arguments1);
486
486
Py_DECREF (arguments1);
487
487
if (!PyLong_Check (cres1)) {
@@ -494,7 +494,7 @@ static PyObject* BinarySearchTree__lca_2(BinarySearchTree* self, PyObject* args)
494
494
PyErr_SetString (PyExc_ValueError, " comparator should be callable" );
495
495
return NULL ;
496
496
}
497
- PyObject* arguments2 = Py_BuildValue (" OO " , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (v)])->key , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (curr_root)])->key );
497
+ PyObject* arguments2 = Py_BuildValue (" (OO) " , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (v)])->key , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (curr_root)])->key );
498
498
PyObject* cres2 = PyObject_CallObject (bt->comparator , arguments2);
499
499
Py_DECREF (arguments2);
500
500
if (!PyLong_Check (cres2)) {
@@ -522,7 +522,7 @@ static PyObject* BinarySearchTree__lca_2(BinarySearchTree* self, PyObject* args)
522
522
PyErr_SetString (PyExc_ValueError, " comparator should be callable" );
523
523
return NULL ;
524
524
}
525
- PyObject* arguments1 = Py_BuildValue (" OO " , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (u)])->key , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (curr_root)])->key );
525
+ PyObject* arguments1 = Py_BuildValue (" (OO) " , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (u)])->key , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (curr_root)])->key );
526
526
PyObject* cres1 = PyObject_CallObject (bt->comparator , arguments1);
527
527
Py_DECREF (arguments1);
528
528
if (!PyLong_Check (cres1)) {
@@ -535,7 +535,7 @@ static PyObject* BinarySearchTree__lca_2(BinarySearchTree* self, PyObject* args)
535
535
PyErr_SetString (PyExc_ValueError, " comparator should be callable" );
536
536
return NULL ;
537
537
}
538
- PyObject* arguments2 = Py_BuildValue (" OO " , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (v)])->key , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (curr_root)])->key );
538
+ PyObject* arguments2 = Py_BuildValue (" (OO) " , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (v)])->key , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (curr_root)])->key );
539
539
PyObject* cres2 = PyObject_CallObject (bt->comparator , arguments2);
540
540
Py_DECREF (arguments2);
541
541
if (!PyLong_Check (cres2)) {
@@ -616,7 +616,7 @@ static PyObject* BinarySearchTree_select(BinarySearchTree* self, PyObject* args)
616
616
PyErr_SetString (PyExc_ValueError, " comparator should be callable" );
617
617
return NULL ;
618
618
}
619
- PyObject* arguments = Py_BuildValue (" OO " , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (left_walk)])->key , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (walk)])->key );
619
+ PyObject* arguments = Py_BuildValue (" (OO) " , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (left_walk)])->key , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (walk)])->key );
620
620
PyObject* cres = PyObject_CallObject (bt->comparator , arguments);
621
621
Py_DECREF (arguments);
622
622
if (!PyLong_Check (cres)) {
@@ -637,7 +637,7 @@ static PyObject* BinarySearchTree_select(BinarySearchTree* self, PyObject* args)
637
637
PyErr_SetString (PyExc_ValueError, " comparator should be callable" );
638
638
return NULL ;
639
639
}
640
- PyObject* arguments = Py_BuildValue (" OO " , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (right_walk)])->key , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (walk)])->key );
640
+ PyObject* arguments = Py_BuildValue (" (OO) " , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (right_walk)])->key , reinterpret_cast <TreeNode*>(bt->tree ->_one_dimensional_array ->_data [PyLong_AsLong (walk)])->key );
641
641
PyObject* cres = PyObject_CallObject (bt->comparator , arguments);
642
642
Py_DECREF (arguments);
643
643
if (!PyLong_Check (cres)) {
0 commit comments