From 8f64fe8fbd0a824af8a5d458864a71c540f46035 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Tue, 27 Sep 2022 08:23:27 -0700 Subject: [PATCH] core plugin: make 'IS_CLUSTER' macro a function This improves type safety, while still being inline-able by the compiler. --- plugin/core/gvrender_core_json.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/core/gvrender_core_json.c b/plugin/core/gvrender_core_json.c index 7b75a4f2b..e25810d53 100644 --- a/plugin/core/gvrender_core_json.c +++ b/plugin/core/gvrender_core_json.c @@ -58,7 +58,9 @@ typedef struct { #define ED_gid(n) (((gvid_t*)aggetrec(n, ID, FALSE))->id) #define GD_gid(n) (((gvid_t*)aggetrec(n, ID, FALSE))->id) -#define IS_CLUSTER(s) startswith(agnameof(s), "cluster") +static bool IS_CLUSTER(Agraph_t *s) { + return startswith(agnameof(s), "cluster"); +} static void json_begin_graph(GVJ_t *job) { -- 2.40.0