From 1b62b2fae1214cee4bacf0cf8b9aea3a9723574e Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sat, 27 Jun 2020 07:27:25 +0200 Subject: [PATCH] src/dictionary.c: Move dict_ref next to dict_unref This make it easier for me to hack when I'm tracking down memory (de)allocation errors. --- src/data/dictionary.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/data/dictionary.c b/src/data/dictionary.c index 40352b0f2b..a04fcaed44 100644 --- a/src/data/dictionary.c +++ b/src/data/dictionary.c @@ -186,13 +186,6 @@ dict_create (const char *encoding) return d; } -struct dictionary * -dict_ref (struct dictionary *s) -{ - s->ref_cnt++; - return s; -} - /* Creates and returns a (deep) copy of an existing dictionary. @@ -314,6 +307,13 @@ _dict_destroy (struct dictionary *d) free (d); } +struct dictionary * +dict_ref (struct dictionary *d) +{ + d->ref_cnt++; + return d; +} + void dict_unref (struct dictionary *d) { -- 2.30.2