@@ -6352,32 +6352,32 @@ typedef struct {
63526352 PyObject* graph;
63536353} igraphmodule_i_Graph_motifs_randesu_callback_data_t;
63546354
6355- igraph_bool_t igraphmodule_i_Graph_motifs_randesu_callback(const igraph_t *graph,
6356- igraph_vector_t *vids, int isoclass, void* extra) {
6355+ igraph_error_t igraphmodule_i_Graph_motifs_randesu_callback(const igraph_t *graph,
6356+ igraph_vector_int_t *vids, int isoclass, void* extra) {
63576357 igraphmodule_i_Graph_motifs_randesu_callback_data_t* data =
63586358 (igraphmodule_i_Graph_motifs_randesu_callback_data_t*)extra;
63596359 PyObject* vector;
63606360 PyObject* result;
63616361 igraph_bool_t retval;
63626362
6363- vector = igraphmodule_vector_t_to_PyList (vids, IGRAPHMODULE_TYPE_INT );
6363+ vector = igraphmodule_vector_int_t_to_PyList (vids);
63646364 if (vector == NULL) {
63656365 /* Error in conversion, return 1 */
6366- return 1 ;
6366+ return IGRAPH_FAILURE ;
63676367 }
63686368
63696369 result = PyObject_CallFunction(data->func, "OOi", data->graph, vector, isoclass);
63706370 Py_DECREF(vector);
63716371
63726372 if (result == NULL) {
63736373 /* Error in callback, return 1 */
6374- return 1 ;
6374+ return IGRAPH_FAILURE ;
63756375 }
63766376
63776377 retval = PyObject_IsTrue(result);
63786378 Py_DECREF(result);
63796379
6380- return retval;
6380+ return retval ? IGRAPH_STOP : IGRAPH_SUCCESS ;
63816381}
63826382
63836383/** \ingroup python_interface_graph
@@ -8819,17 +8819,17 @@ igraph_bool_t igraphmodule_i_Graph_isomorphic_vf2_callback_fn(
88198819
88208820 map12_o = igraphmodule_vector_int_t_to_PyList(map12);
88218821 if (map12_o == NULL) {
8822- /* Error in conversion, return 0 to stop the search */
8822+ /* Error in conversion, return an error code */
88238823 PyErr_WriteUnraisable(data->callback_fn);
8824- return 0 ;
8824+ return IGRAPH_FAILURE ;
88258825 }
88268826
88278827 map21_o = igraphmodule_vector_int_t_to_PyList(map21);
88288828 if (map21_o == NULL) {
8829- /* Error in conversion, return 0 to stop the search */
8829+ /* Error in conversion, return an error code */
88308830 PyErr_WriteUnraisable(data->callback_fn);
88318831 Py_DECREF(map21_o);
8832- return 0 ;
8832+ return IGRAPH_FAILURE ;
88338833 }
88348834
88358835 result = PyObject_CallFunction(data->callback_fn, "OOOO", data->graph1, data->graph2,
@@ -8838,15 +8838,15 @@ igraph_bool_t igraphmodule_i_Graph_isomorphic_vf2_callback_fn(
88388838 Py_DECREF(map21_o);
88398839
88408840 if (result == NULL) {
8841- /* Error in callback, return 0 */
8841+ /* Error in callback, return an error code */
88428842 PyErr_WriteUnraisable(data->callback_fn);
8843- return 0 ;
8843+ return IGRAPH_FAILURE ;
88448844 }
88458845
88468846 retval = PyObject_IsTrue(result);
88478847 Py_DECREF(result);
88488848
8849- return retval;
8849+ return retval ? IGRAPH_SUCCESS : IGRAPH_STOP ;
88508850}
88518851
88528852igraph_bool_t igraphmodule_i_Graph_isomorphic_vf2_node_compat_fn(
0 commit comments