fixes to prevent unnecessary invocation of iter()
[pygr.git] / pygr / cgraph.h
blobb68fcfd90d89f65ca6b04db27dcdeb148d51bc9d
2 #include <stdlib.h>
4 typedef struct {
5 int k;
6 int v;
7 } CDictEntry;
9 typedef struct {
10 int n;
11 CDictEntry *dict;
12 } CDict;
14 typedef struct {
15 int k;
16 CDict *v;
17 } CGraphEntry;
19 typedef struct {
20 int n;
21 CGraphEntry *dict;
22 } CGraph;
24 extern CDict *cdict_alloc(int n);
25 extern int cdict_free(CDict *d);
26 extern int cdict_qsort_cmp(const void *void_a,const void *void_b);
27 extern CDictEntry *cdict_getitem(CDict *d,int k);
28 extern CGraph *cgraph_alloc(int n);
29 extern int cgraph_free(CGraph *d);
30 extern CGraphEntry *cgraph_getitem(CGraph *d,int k);
31 extern int *calloc_int(int n);