From 2788e1f440352e754ee42dc9d01922ce627a2499 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Mon, 9 Aug 2021 18:57:18 -0700 Subject: [PATCH] aginit: take a const char* instead of char* for record name This function does not modify its argument. No changelog entry because this is already covered by the existing #634 one for the upcoming release. --- lib/cgraph/cgraph.h | 4 ++-- lib/cgraph/rec.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/cgraph/cgraph.h b/lib/cgraph/cgraph.h index 6afd5482a..89f7ed1ce 100644 --- a/lib/cgraph/cgraph.h +++ b/lib/cgraph/cgraph.h @@ -344,8 +344,8 @@ CGRAPH_API void *agbindrec(void *obj, const char *name, unsigned int recsize, int move_to_front); CGRAPH_API Agrec_t *aggetrec(void *obj, const char *name, int move_to_front); CGRAPH_API int agdelrec(void *obj, const char *name); -CGRAPH_API void aginit(Agraph_t * g, int kind, char *rec_name, int rec_size, - int move_to_front); +CGRAPH_API void aginit(Agraph_t * g, int kind, const char *rec_name, + int rec_size, int move_to_front); CGRAPH_API void agclean(Agraph_t * g, int kind, char *rec_name); CGRAPH_API char *agget(void *obj, char *name); diff --git a/lib/cgraph/rec.c b/lib/cgraph/rec.c index 9cf5ae850..c16c1fe68 100644 --- a/lib/cgraph/rec.c +++ b/lib/cgraph/rec.c @@ -168,8 +168,8 @@ static void simple_delrec(Agraph_t * g, Agobj_t * obj, void *rec_name) agdelrec(obj, rec_name); } -void aginit(Agraph_t * g, int kind, char *rec_name, int arg_rec_size, int mtf) -{ +void aginit(Agraph_t * g, int kind, const char *rec_name, int arg_rec_size, + int mtf) { Agnode_t *n; Agedge_t *e; Agraph_t *s; -- 2.40.0