@@ -103,7 +103,7 @@ static PyObject* BinarySearchTree_search(BinarySearchTree* self, PyObject* args,
103103 PyErr_SetString (PyExc_ValueError, " comparator should be callable" );
104104 return NULL ;
105105 }
106- PyObject* arguments = Py_BuildValue (" OO " , key, curr_key);
106+ PyObject* arguments = Py_BuildValue (" (OO) " , key, curr_key);
107107 PyObject* res = PyObject_CallObject (bt->comparator , arguments);
108108 Py_DECREF (arguments);
109109 if (!PyLong_Check (res)) {
@@ -125,7 +125,7 @@ static PyObject* BinarySearchTree_search(BinarySearchTree* self, PyObject* args,
125125 return walk;
126126 }
127127 else {
128- return Py_BuildValue (" OO " ,walk,parent);
128+ return Py_BuildValue (" (OO) " ,walk,parent);
129129 }
130130 Py_RETURN_NONE; // dummy return statement, never executed
131131}
@@ -168,7 +168,7 @@ static PyObject* BinarySearchTree_insert(BinarySearchTree* self, PyObject* args)
168168 PyErr_SetString (PyExc_ValueError, " comparator should be callable" );
169169 return NULL ;
170170 }
171- PyObject* arguments = Py_BuildValue (" OO " , key, curr_key);
171+ PyObject* arguments = Py_BuildValue (" (OO) " , key, curr_key);
172172 PyObject* cres = PyObject_CallObject (bt->comparator , arguments);
173173 Py_DECREF (arguments);
174174 if (!PyLong_Check (cres)) {
@@ -359,7 +359,7 @@ static PyObject* BinarySearchTree__bound_helper(BinarySearchTree* self, PyObject
359359 PyErr_SetString (PyExc_ValueError, " comparator should be callable" );
360360 return NULL ;
361361 }
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);
363363 PyObject* cres = PyObject_CallObject (bt->comparator , arguments);
364364 Py_DECREF (arguments);
365365 if (!PyLong_Check (cres)) {
@@ -481,7 +481,7 @@ static PyObject* BinarySearchTree__lca_2(BinarySearchTree* self, PyObject* args)
481481 PyErr_SetString (PyExc_ValueError, " comparator should be callable" );
482482 return NULL ;
483483 }
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 );
485485 PyObject* cres1 = PyObject_CallObject (bt->comparator , arguments1);
486486 Py_DECREF (arguments1);
487487 if (!PyLong_Check (cres1)) {
@@ -494,7 +494,7 @@ static PyObject* BinarySearchTree__lca_2(BinarySearchTree* self, PyObject* args)
494494 PyErr_SetString (PyExc_ValueError, " comparator should be callable" );
495495 return NULL ;
496496 }
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 );
498498 PyObject* cres2 = PyObject_CallObject (bt->comparator , arguments2);
499499 Py_DECREF (arguments2);
500500 if (!PyLong_Check (cres2)) {
@@ -522,7 +522,7 @@ static PyObject* BinarySearchTree__lca_2(BinarySearchTree* self, PyObject* args)
522522 PyErr_SetString (PyExc_ValueError, " comparator should be callable" );
523523 return NULL ;
524524 }
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 );
526526 PyObject* cres1 = PyObject_CallObject (bt->comparator , arguments1);
527527 Py_DECREF (arguments1);
528528 if (!PyLong_Check (cres1)) {
@@ -535,7 +535,7 @@ static PyObject* BinarySearchTree__lca_2(BinarySearchTree* self, PyObject* args)
535535 PyErr_SetString (PyExc_ValueError, " comparator should be callable" );
536536 return NULL ;
537537 }
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 );
539539 PyObject* cres2 = PyObject_CallObject (bt->comparator , arguments2);
540540 Py_DECREF (arguments2);
541541 if (!PyLong_Check (cres2)) {
@@ -616,7 +616,7 @@ static PyObject* BinarySearchTree_select(BinarySearchTree* self, PyObject* args)
616616 PyErr_SetString (PyExc_ValueError, " comparator should be callable" );
617617 return NULL ;
618618 }
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 );
620620 PyObject* cres = PyObject_CallObject (bt->comparator , arguments);
621621 Py_DECREF (arguments);
622622 if (!PyLong_Check (cres)) {
@@ -637,7 +637,7 @@ static PyObject* BinarySearchTree_select(BinarySearchTree* self, PyObject* args)
637637 PyErr_SetString (PyExc_ValueError, " comparator should be callable" );
638638 return NULL ;
639639 }
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 );
641641 PyObject* cres = PyObject_CallObject (bt->comparator , arguments);
642642 Py_DECREF (arguments);
643643 if (!PyLong_Check (cres)) {
0 commit comments