From 980f5407e1741660f2c9c8bbb7ef768857d8881b Mon Sep 17 00:00:00 2001 From: erg Date: Wed, 26 Mar 2008 17:56:29 +0000 Subject: [PATCH] Modify cgraph.h to be compatible with C++ --- lib/cgraph/cgraph.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/cgraph/cgraph.h b/lib/cgraph/cgraph.h index 89c3801cc..e301cda07 100644 --- a/lib/cgraph/cgraph.h +++ b/lib/cgraph/cgraph.h @@ -19,6 +19,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef FALSE #define FALSE (0) #endif @@ -328,7 +332,7 @@ struct Agdatadict_s { /* set of dictionaries per graph */ extern Agsym_t *agattr(Agraph_t * g, int kind, char *name, char *value); extern Agsym_t *agattrsym(void *obj, char *name); extern Agsym_t *agnxtattr(Agraph_t * g, int kind, Agsym_t * attr); -extern int agcopyattr(void *old, void *new); +extern int agcopyattr(void *oldobj, void *newobj); extern void *agbindrec(void *obj, char *name, unsigned int size, int move_to_front); @@ -434,4 +438,7 @@ and edges are embedded in main graph objects but allocated separately in subgrap #if _PACKAGE_ast _END_EXTERNS_ #endif +#ifdef __cplusplus +} +#endif #endif -- 2.40.0