summaryrefslogtreecommitdiffstats
path: root/src/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/html.c')
-rw-r--r--src/html.c11
1 files changed, 7 insertions, 4 deletions
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, "</" #ELEM ">", NULL); \
+ } \
+ gchar * \
+ mq_html_##ELEM##_free(gchar *text) \
{ \
gchar *e; \
e = g_strconcat("<" #ELEM ">", text, "</" #ELEM ">", NULL); \
- if (destroy) { \
- destroy(text); \
- } \
+ g_free(text); \
return e; \
}
TEXT_ELEMENT(h1)