# API for function \`gvPluginList\`: When did it change?

**URL:** <https://forum.graphviz.org/t/api-for-function-gvpluginlist-when-did-it-change/3135>\
**Category:** Dev\
**Created:** [August 10, 2025, 12:49pm UTC](https://forum.graphviz.org/t/api-for-function-gvpluginlist-when-did-it-change/3135 "2025-08-10T12:49:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_Hairgrove](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@Robert\_Hairgrove](https://forum.graphviz.org/u/Robert_Hairgrove)\
**Post date:** [August 10, 2025, 12:49pm UTC](https://forum.graphviz.org/t/api-for-function-gvpluginlist-when-did-it-change/3135/1 "2025-08-10T12:49:08Z")

</div>

I am trying to update an older application which worked fine in 2023 using GraphViz as a library.  
The function `gvPluginList`, declared in `gvc.h`, used to take four arguments, but now the last one was dropped at some point (type `const char *`)..

I would like to wrap the call to `gvPluginList` in `#if..#endif` macros and check the version number when this no longer worked as before, but don’t know how to find this without looking at all of the source code between version 2.4x and currently 13.1.2.

Does anyone know offhand?

---

<div class="post-metadata">

**Author:** ![Robert\_Hairgrove](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@Robert\_Hairgrove](https://forum.graphviz.org/u/Robert_Hairgrove)\
**Post date:** [August 10, 2025, 1:13pm UTC](https://forum.graphviz.org/t/api-for-function-gvpluginlist-when-did-it-change/3135/2 "2025-08-10T13:13:33Z")

</div>

Duh… 🤦‍♂️ I finally thought to look at CHANGELOG.md, and there it is (version 9.0.0).

(EDIT: It would be nice if the version was exposed as a number – better yet: broken down into major, minor, and build elements – and not only as a string.)

(EDIT #2: Since there is apparently no way to get the C preprocessor to convert a string into a number, I found some other macros which had been removed in the upgrade to version 9.0.0. Now I am able to check for the definition of the macro `DTTREEMATCH` which was defined before, i.e.:

```auto
#ifndef DTTREEMATCH
#define GV_VERSION_9_0_0_TEST
#endif

```

Hoping that there won’t be too many other problems in this regard. 🙏

(EDIT #3: There was a change of parameter type for the function `gvRenderData` (the last, which used to take an `unsigned int*` and as of version 13.0,0 takes a `size_t*`). Here is a switch you can use for that:

```auto
#ifndef agnew
#define GV_VERSION_13_0_0_TEST
#endif

```

According to the change log, there was a macro `agnew` which was removed in that version.

---

<div class="post-metadata">

**Author:** ![smattr](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/smattr/32/85_2.png) [@smattr](https://forum.graphviz.org/u/smattr)\
**Post date:** [August 11, 2025, 10:39am UTC](https://forum.graphviz.org/t/api-for-function-gvpluginlist-when-did-it-change/3135/3 "2025-08-11T10:39:12Z")

</div>

Git can often tell you some of these things:

```bash
$ # in Graphviz repo
$ git blame -- lib/gvc/gvc.h
…
7a112085e0 lib/gvc/gvc.h (Matthew Fernandez 2023-07-11 19:25:28 +1000 122) GVC_API char **gvPluginList(GVC_t *gvc, const char *kind, int *sz);
…
$ git tag --contains 7a112085e0
9.0.0
…

```

> [@Robert\_Hairgrove](#):
>
> It would be nice if the version was exposed as a number – better yet: broken down into major, minor, and build elements – and not only as a string.

I didn’t realise this wasn’t already exposed. We can certainly add that.

---

<div class="post-metadata">

**Author:** ![Robert\_Hairgrove](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@Robert\_Hairgrove](https://forum.graphviz.org/u/Robert_Hairgrove)\
**Post date:** [August 12, 2025, 9:14am UTC](https://forum.graphviz.org/t/api-for-function-gvpluginlist-when-did-it-change/3135/4 "2025-08-12T09:14:00Z")

</div>

Hi Matthew,

> [@smattr](#):
>
> I didn’t realise this wasn’t already exposed. We can certainly add that.

Here is what I have in `graphviz_version.h`:

```auto
#pragma once
#define GVPLUGIN_CONFIG_FILE "config8"
#define GVPLUGIN_VERSION 8
#define PACKAGE_BUGREPORT "https://gitlab.com/graphviz/graphviz/-/issues"
#define PACKAGE_NAME "graphviz"
#define PACKAGE_STRING "graphviz 13.1.2"
#define PACKAGE_TARNAME "graphviz"
#define PACKAGE_URL ""
#define PACKAGE_VERSION "13.1.2"

```

Maybe I missed something?

---

<div class="post-metadata">

**Author:** ![smattr](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/smattr/32/85_2.png) [@smattr](https://forum.graphviz.org/u/smattr)\
**Post date:** [August 12, 2025, 9:52am UTC](https://forum.graphviz.org/t/api-for-function-gvpluginlist-when-did-it-change/3135/5 "2025-08-12T09:52:51Z")

</div>

No, you’re completely correct. I just hadn’t looked at that file for some time. I agree that there isn’t really a good way to do this conditional coding without the version information exposed as integers.
