Skip to content

Commit a3093fe

Browse files
committed
cleaup
1 parent f85982a commit a3093fe

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/_igraph/igraphmodule.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -229,25 +229,24 @@ PyObject* igraphmodule_set_status_handler(PyObject* self, PyObject* o) {
229229

230230
PyObject* igraphmodule_align_layout(PyObject* self, PyObject* args, PyObject* kwds) {
231231
static char* kwlist[] = {"graph", "layout", NULL};
232-
PyObject *pygraph, *pylayout;
232+
PyObject *graph_o, *layout_o;
233233
PyObject *res;
234-
const igraph_t *graph;
234+
igraph_t *graph;
235235
igraph_matrix_t layout;
236236

237-
if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &PyList_Type, &pygraph, &pylayout)) {
237+
if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &PyList_Type, &graph_o, &layout_o)) {
238238
return NULL;
239239
}
240240

241-
graph = PyIGraph_ToCGraph(pygraph);
242-
if (graph == NULL) {
241+
if (igraphmodule_PyObject_to_igraph_t(graph_o, &graph)) {
243242
return NULL;
244243
}
245244

246-
if (! igraphmodule_PyObject_to_matrix_t(pylayout, &layout, "layout")) {
245+
if (igraphmodule_PyObject_to_matrix_t(layout_o, &layout, "layout")) {
247246
return NULL;
248247
}
249248

250-
if (! igraph_layout_align(graph, &layout)) {
249+
if (igraph_layout_align(graph, &layout)) {
251250
igraphmodule_handle_igraph_error();
252251
igraph_matrix_destroy(&layout);
253252
return NULL;

0 commit comments

Comments
 (0)