From dbac4d510ed167efdd1f13ac37594a52f94e71aa Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 14 Jan 2009 13:44:04 +0000 Subject: Don't build the serialisation code in release mode svn path=/trunk/libcss/; revision=6064 --- src/bytecode/bytecode.h | 2 ++ src/bytecode/dump.c | 2 ++ src/stylesheet.c | 2 ++ src/stylesheet.h | 2 ++ 4 files changed, 8 insertions(+) diff --git a/src/bytecode/bytecode.h b/src/bytecode/bytecode.h index 6c320a1..64c68ac 100644 --- a/src/bytecode/bytecode.h +++ b/src/bytecode/bytecode.h @@ -167,7 +167,9 @@ static inline bool isInherit(uint32_t OPV) return getFlags(OPV) & 0x2; } +#ifndef NDEBUG void css_bytecode_dump(void *bytecode, uint32_t length, FILE *fp); +#endif #endif diff --git a/src/bytecode/dump.c b/src/bytecode/dump.c index 1299164..75733d1 100644 --- a/src/bytecode/dump.c +++ b/src/bytecode/dump.c @@ -11,6 +11,7 @@ #include "bytecode/opcodes.h" #include "utils/fpmath.h" +#ifndef NDEBUG /** * Opcode names, indexed by opcode */ @@ -1825,4 +1826,5 @@ void css_bytecode_dump(void *bytecode, uint32_t length, FILE *fp) } +#endif diff --git a/src/stylesheet.c b/src/stylesheet.c index 6d01e18..1c5cb3c 100644 --- a/src/stylesheet.c +++ b/src/stylesheet.c @@ -783,6 +783,7 @@ css_error css_stylesheet_remove_rule(css_stylesheet *sheet, css_rule *rule) return CSS_OK; } +#ifndef NDEBUG static void css_stylesheet_dump_rule(css_rule *rule, FILE *target, size_t *size); static void css_stylesheet_dump_selector_list(css_selector *list, FILE *target, @@ -1014,4 +1015,5 @@ void css_stylesheet_dump_string(const parserutils_hash_entry *string, { fprintf(target, "%.*s", (int) string->len, string->data); } +#endif diff --git a/src/stylesheet.h b/src/stylesheet.h index a7b1cfd..fbb87b4 100644 --- a/src/stylesheet.h +++ b/src/stylesheet.h @@ -217,7 +217,9 @@ css_error css_stylesheet_rule_set_import(css_stylesheet *sheet, css_error css_stylesheet_add_rule(css_stylesheet *sheet, css_rule *rule); css_error css_stylesheet_remove_rule(css_stylesheet *sheet, css_rule *rule); +#ifndef NDEBUG void css_stylesheet_dump(css_stylesheet *sheet, FILE *target); +#endif #endif -- cgit v1.2.3