igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Nodes at a given distance


From: Tamas Nepusz
Subject: Re: [igraph] Nodes at a given distance
Date: Wed, 30 Jul 2008 12:27:02 +0200

If the change is on SVN/CVS/git/tla/whatnot i can get it from there.
Otherwise, a patch is more than welcomed :D
I can't commit to our Arch repository right now due to some technical problems, so I send the patch here:

--- orig/interfaces/python/src/bfsiter.c
+++ mod/interfaces/python/src/bfsiter.c
@@ -46,6 +46,7 @@
   long int no_of_nodes, r;

o=PyObject_GC_New(igraphmodule_BFSIterObject, &igraphmodule_BFSIterType);
+  Py_INCREF(g);
   o->gref=g;
   o->graph=&g->g;

@@ -240,8 +241,8 @@
   0,                                        // tp_as_buffer
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, // tp_flags
   "igraph BFS iterator object",             // tp_doc
-  0,                                        // tp_traverse
-  0,                                        // tp_clear
+  (traverseproc) igraphmodule_BFSIter_traverse, /* tp_traverse */
+  (inquiry) igraphmodule_BFSIter_clear,     /* tp_clear */
   0,                                        // tp_richcompare
   0,                                        // tp_weaklistoffset
   (getiterfunc)igraphmodule_BFSIter_iter,   /* tp_iter */

The line numbers refer to the 0.6 tree, but the patch should also work with 0.5.

Please let me know if you still have errors and send me a small snippet of code reproducing the error.

Thanks,
--
Tamas



If there's anything i can do to test, just drop me a line.

Thanks really a lot,

marco


--
รจ il gioco della vita,
la dobbiamo preparare
che non ci sfugga dalle dita
come la sabbia in riva al mare.

Lucio Dalla


_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help





reply via email to

[Prev in Thread] Current Thread [Next in Thread]