https://github.com/pygraphviz/pygraphviz/pull/573/

Index: pygraphviz/graphviz.i
--- pygraphviz/graphviz.i.orig
+++ pygraphviz/graphviz.i
@@ -338,7 +338,12 @@ int gvRenderFilename(GVC_t *gvc, Agraph_t* g, char *fo
 /* three lines are straight from the SWIG manual.  */
 %include <cstring.i>
 %include <typemaps.i>
+#if GRAPHVIZ_VERSION_MAJOR >= 14
+%cstring_output_allocate_size(char **result, size_t* size, free(*$1));
+int gvRenderData(GVC_t *gvc, Agraph_t* g, char *format, char **result, size_t *size);
+#else
 %cstring_output_allocate_size(char **result, unsigned int* size, free(*$1));
 int gvRenderData(GVC_t *gvc, Agraph_t* g, char *format, char **result, unsigned int *size);
+#endif
 /* Free memory allocated and pointed to by *result in gvRenderData */
 extern void gvFreeRenderData (char* data);
