From 6c1edf4ec1cf1ddab82b597867d9c846267b97ca Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Thu, 26 Oct 2017 22:20:09 -0400 Subject: mq_html_h*(), mq_html_p(): Split out *_free() variants And update calls. --- (limited to 'src/html.c') diff --git a/src/html.c b/src/html.c index 71cdd8e..382d616 100644 --- a/src/html.c +++ b/src/html.c @@ -231,13 +231,16 @@ mq_html_document(const gchar *title, ...) #define TEXT_ELEMENT(ELEM) \ gchar * \ - mq_html_##ELEM(GDestroyNotify destroy, gchar *text) \ + mq_html_##ELEM(const gchar *text) \ + { \ + return g_strconcat("<" #ELEM ">", text, "", NULL); \ + } \ + gchar * \ + mq_html_##ELEM##_free(gchar *text) \ { \ gchar *e; \ e = g_strconcat("<" #ELEM ">", text, "", NULL); \ - if (destroy) { \ - destroy(text); \ - } \ + g_free(text); \ return e; \ } TEXT_ELEMENT(h1) -- cgit v0.9.1