Restores the public API to what's documented in cgraph.3 by instead of
casting the void pointer that dtdelete returns to long, returns an int
which is 0 if the pointer is NULL and 1 otherwise. Internally the
return value is however not used today.
CGRAPH_API int agrelabel(void *obj, char *name); /* scary */
CGRAPH_API int agrelabel_node(Agnode_t * n, char *newname);
CGRAPH_API int agdelete(Agraph_t * g, void *obj);
-CGRAPH_API long agdelsubg(Agraph_t * g, Agraph_t * sub); /* could be agclose */
+CGRAPH_API int agdelsubg(Agraph_t * g, Agraph_t * sub); /* could be agclose */
CGRAPH_API int agdelnode(Agraph_t * g, Agnode_t * arg_n);
CGRAPH_API int agdeledge(Agraph_t * g, Agedge_t * arg_e);
CGRAPH_API int agobjkind(void *);
/* this function is only responsible for deleting the entry
* in the parent's subg dict. the rest is done in agclose().
*/
-long agdelsubg(Agraph_t * g, Agraph_t * subg)
+int agdelsubg(Agraph_t * g, Agraph_t * subg)
{
- return (long) dtdelete(g->g_dict, subg);
+ return dtdelete(g->g_dict, subg) != NULL;
}