The lib/cgraph/alloc.h wrappers are similar to the older lib/common/memory.h
wrappers except (1) they are header-only and (2) they live in a directory
(cgraph) that is at the root of the dependency tree. The long term plan is to
replace all use of lib/common/memory.h with lib/cgraph/alloc.h.
#include <gvc/gvplugin_render.h>
#include <gvc/gvplugin_device.h>
#include <cgraph/agxbuf.h>
+#include <cgraph/alloc.h>
#include <cgraph/unreachable.h>
#include <common/utils.h>
#include <gvc/gvc.h>
return 0;
}
- Agedge_t **edges = gcalloc(count, sizeof(Agedge_t *));
+ Agedge_t **edges = gv_calloc(count, sizeof(Agedge_t *));
size_t i = 0;
for (Agnode_t *np = agfstnode(g); np; np = agnxtnode(g, np)) {