--- src/graphobject.c.orig 2008-01-01 13:12:18.000000000 -0500
+++ src/graphobject.c 2008-01-24 16:22:49.000000000 -0500
@@ -210,11 +210,11 @@
PyObject * args, PyObject * kwds)
{
char *kwlist[] = { "n", "edges", "directed", NULL };
- int n = 1;
+ long n = 1;
PyObject *edges = NULL, *dir = Py_False;
igraph_vector_t edges_vector;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|iO!O!", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|lO!O!", kwlist,
&n, &PyList_Type, &edges,
&PyBool_Type, &dir))
return -1;
@@ -704,13 +704,13 @@
long v1, v2;
igraph_integer_t result;
PyObject *directed = Py_False;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "ii|O", kwlist, &v1, &v2,
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "ll|O", kwlist, &v1, &v2,
&directed))
return NULL;
if (igraph_get_eid(&self->g, &result, v1, v2, PyObject_IsTrue(directed)))
return igraphmodule_handle_igraph_error();
- return Py_BuildValue("i", (long)result);
+ return Py_BuildValue("l", (long)result);
}
/** \ingroup python_interface_graph
@@ -1756,7 +1756,7 @@
char *kwlist[] = { "n", "class", "directed", NULL };
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "ii|O", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "ll|O", kwlist,
&n, &isoclass, &directed))
return NULL;
@@ -3523,7 +3523,6 @@
Py_RETURN_NONE;
}
-
/** \ingroup python_interface_graph
* \function igraphmodule_Graph_to_directed
* \brief Converts an undirected graph to a directed one.
@@ -3837,7 +3836,7 @@
char *kwlist[] = { "f", "index", NULL };
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|i", kwlist, &fname, &index))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|l", kwlist, &fname, &index))
return NULL;
f = fopen(fname, "r");
@@ -4640,12 +4639,12 @@
char *kwlist[] = { "vid", "mode", NULL };
long vid;
PyObject *l1, *l2, *l3, *result;
- igraph_neimode_t mode = IGRAPH_OUT;
+ int mode = IGRAPH_OUT;
igraph_vector_t vids;
igraph_vector_t layers;
igraph_vector_t parents;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "i|i", kwlist, &vid, &mode))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "l|i", kwlist, &vid, &mode))
return NULL;
if (vid < 0 || vid > igraph_vcount(&self->g)) {
PyErr_SetString(PyExc_ValueError, "invalid vertex id");
@@ -4662,7 +4661,7 @@
PyErr_SetString(PyExc_MemoryError, "not enough memory");
}
if (igraph_bfs
- (&self->g, (igraph_integer_t) vid, mode, &vids, &layers, &parents)) {
+ (&self->g, (igraph_integer_t) vid, (igraph_neimode_t) mode, &vids, &layers, &parents)) {
igraphmodule_handle_igraph_error();
return NULL;
}
@@ -4709,7 +4708,7 @@
long vid1 = -1, vid2 = -1;
igraph_integer_t v1, v2;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "ii|O", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "ll|O", kwlist,
&vid1, &vid2, &capacity_object))
return NULL;
@@ -4744,7 +4743,7 @@
long vid1 = -1, vid2 = -1;
long n;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|iiO", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|llO", kwlist,
&vid1, &vid2, &capacity_object))
return NULL;
@@ -4819,7 +4818,7 @@
long int i, j, n;
igraph_vector_ptr_t result;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|ii", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|ll", kwlist,
&min_size, &max_size))
return NULL;
@@ -4974,7 +4973,7 @@
long int i, j, n;
igraph_vector_ptr_t result;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|ii", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|ll", kwlist,
&min_size, &max_size))
return NULL;
@@ -5137,7 +5136,7 @@
igraph_vector_t result;
PyObject *o;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|i", kwlist, &mode))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|l", kwlist, &mode))
return NULL;
if (igraph_vector_init(&result, igraph_vcount(&self->g)))
@@ -5222,7 +5221,7 @@
igraph_matrix_t *mptr = 0;
igraph_matrix_t m;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|iO", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|lO", kwlist,
&n, &return_merges)) {
return NULL;
}
@@ -5277,7 +5276,7 @@
igraph_matrix_t *mptr = 0;
igraph_matrix_t m;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|iO", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|lO", kwlist,
&n, &return_merges)) {
return NULL;
}