]> granicus.if.org Git - graphviz/commitdiff
aggetrec: take a const char* instead of char* for record name
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 10 Aug 2021 01:33:06 +0000 (18:33 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 13 Aug 2021 14:50:45 +0000 (07:50 -0700)
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
lib/cgraph/rec.c

index 1f7c1656d1ab1eeaf46b73cbb15d6e80a762118c..425dfc743ca64bb72df5bed7c1ff3e7561a7c27c 100644 (file)
@@ -342,7 +342,7 @@ CGRAPH_API int      agcopyattr(void *oldobj, void *newobj);
 
 CGRAPH_API void *agbindrec(void *obj, char *name, unsigned int size,
                       int move_to_front);
-CGRAPH_API Agrec_t *aggetrec(void *obj, char *name, int move_to_front);
+CGRAPH_API Agrec_t *aggetrec(void *obj, const char *name, int move_to_front);
 CGRAPH_API int agdelrec(void *obj, char *name);
 CGRAPH_API void aginit(Agraph_t * g, int kind, char *rec_name, int rec_size,
                   int move_to_front);
index 68f7e8ee19635f2ebe266158ba868af3f2cab3e0..c82aedf5ec5ca74cd6ed80574ebe87df26bf711c 100644 (file)
@@ -31,7 +31,7 @@ static void set_data(Agobj_t * obj, Agrec_t * data, int mtflock)
 }
 
 /* find record in circular list and do optional move-to-front */
-Agrec_t *aggetrec(void *obj, char *name, int mtf)
+Agrec_t *aggetrec(void *obj, const char *name, int mtf)
 {
     Agobj_t *hdr;
     Agrec_t *d, *first;