aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2014-11-28 16:02:28 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2014-11-28 16:14:03 +0100
commit0421a78bfb9cde5ba5db8afb0d7391f754b46a2b (patch)
tree68d23ff7e71207f4ced9ea577b7586e1f0a4f3b7
parent44e6870b9629bc854e6f92e15518cde80af59f8d (diff)
Always define short name macros for private symbols
Since chunk.h and buffer.h are private now, there's no need to optionally disable the short name macros.
-rw-r--r--src/buffer.h67
-rw-r--r--src/chunk.h23
2 files changed, 44 insertions, 46 deletions
diff --git a/src/buffer.h b/src/buffer.h
index be888e1..7401b22 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -136,40 +136,39 @@ void cmark_strbuf_normalize_whitespace(cmark_strbuf *s);
CMARK_EXPORT
void cmark_strbuf_unescape(cmark_strbuf *s);
-#ifndef CMARK_NO_SHORT_NAMES
- #define strbuf cmark_strbuf
- #define strbuf__initbuf cmark_strbuf__initbuf
- #define strbuf__oom cmark_strbuf__oom
- #define GH_BUF_INIT CMARK_GH_BUF_INIT
- #define strbuf_init cmark_strbuf_init
- #define strbuf_try_grow cmark_strbuf_try_grow
- #define strbuf_grow cmark_strbuf_grow
- #define strbuf_free cmark_strbuf_free
- #define strbuf_swap cmark_strbuf_swap
- #define strbuf_oom cmark_strbuf_oom
- #define strbuf_len cmark_strbuf_len
- #define strbuf_cmp cmark_strbuf_cmp
- #define strbuf_attach cmark_strbuf_attach
- #define strbuf_detach cmark_strbuf_detach
- #define strbuf_copy_cstr cmark_strbuf_copy_cstr
- #define strbuf_at cmark_strbuf_at
- #define strbuf_set cmark_strbuf_set
- #define strbuf_sets cmark_strbuf_sets
- #define strbuf_putc cmark_strbuf_putc
- #define strbuf_put cmark_strbuf_put
- #define strbuf_puts cmark_strbuf_puts
- #define strbuf_printf cmark_strbuf_printf
- #define strbuf_vprintf cmark_strbuf_vprintf
- #define strbuf_clear cmark_strbuf_clear
- #define strbuf_strchr cmark_strbuf_strchr
- #define strbuf_strrchr cmark_strbuf_strrchr
- #define strbuf_drop cmark_strbuf_drop
- #define strbuf_truncate cmark_strbuf_truncate
- #define strbuf_rtrim cmark_strbuf_rtrim
- #define strbuf_trim cmark_strbuf_trim
- #define strbuf_normalize_whitespace cmark_strbuf_normalize_whitespace
- #define strbuf_unescape cmark_strbuf_unescape
-#endif
+// Convenience macros
+#define strbuf cmark_strbuf
+#define strbuf__initbuf cmark_strbuf__initbuf
+#define strbuf__oom cmark_strbuf__oom
+#define GH_BUF_INIT CMARK_GH_BUF_INIT
+#define strbuf_init cmark_strbuf_init
+#define strbuf_try_grow cmark_strbuf_try_grow
+#define strbuf_grow cmark_strbuf_grow
+#define strbuf_free cmark_strbuf_free
+#define strbuf_swap cmark_strbuf_swap
+#define strbuf_oom cmark_strbuf_oom
+#define strbuf_len cmark_strbuf_len
+#define strbuf_cmp cmark_strbuf_cmp
+#define strbuf_attach cmark_strbuf_attach
+#define strbuf_detach cmark_strbuf_detach
+#define strbuf_copy_cstr cmark_strbuf_copy_cstr
+#define strbuf_at cmark_strbuf_at
+#define strbuf_set cmark_strbuf_set
+#define strbuf_sets cmark_strbuf_sets
+#define strbuf_putc cmark_strbuf_putc
+#define strbuf_put cmark_strbuf_put
+#define strbuf_puts cmark_strbuf_puts
+#define strbuf_printf cmark_strbuf_printf
+#define strbuf_vprintf cmark_strbuf_vprintf
+#define strbuf_clear cmark_strbuf_clear
+#define strbuf_strchr cmark_strbuf_strchr
+#define strbuf_strrchr cmark_strbuf_strrchr
+#define strbuf_drop cmark_strbuf_drop
+#define strbuf_truncate cmark_strbuf_truncate
+#define strbuf_rtrim cmark_strbuf_rtrim
+#define strbuf_trim cmark_strbuf_trim
+#define strbuf_normalize_whitespace cmark_strbuf_normalize_whitespace
+#define strbuf_unescape cmark_strbuf_unescape
#ifdef __cplusplus
}
diff --git a/src/chunk.h b/src/chunk.h
index 7a1dbc3..22594b1 100644
--- a/src/chunk.h
+++ b/src/chunk.h
@@ -107,17 +107,16 @@ static inline cmark_chunk cmark_chunk_buf_detach(cmark_strbuf *buf)
return c;
}
-#ifndef CMARK_NO_SHORT_NAMES
- #define chunk cmark_chunk
- #define chunk_free cmark_chunk_free
- #define chunk_ltrim cmark_chunk_ltrim
- #define chunk_rtrim cmark_chunk_rtrim
- #define chunk_trim cmark_chunk_trim
- #define chunk_strchr cmark_chunk_strchr
- #define chunk_to_cstr cmark_chunk_to_cstr
- #define chunk_literal cmark_chunk_literal
- #define chunk_dup cmark_chunk_dup
- #define chunk_buf_detach cmark_chunk_buf_detach
-#endif
+// Convenience macros
+#define chunk cmark_chunk
+#define chunk_free cmark_chunk_free
+#define chunk_ltrim cmark_chunk_ltrim
+#define chunk_rtrim cmark_chunk_rtrim
+#define chunk_trim cmark_chunk_trim
+#define chunk_strchr cmark_chunk_strchr
+#define chunk_to_cstr cmark_chunk_to_cstr
+#define chunk_literal cmark_chunk_literal
+#define chunk_dup cmark_chunk_dup
+#define chunk_buf_detach cmark_chunk_buf_detach
#endif