[cairo-commit] src/cairoint.h src/cairo-unicode.c
Behdad Esfahbod
behdad at kemper.freedesktop.org
Thu Dec 20 09:30:42 PST 2007
src/cairo-unicode.c | 2 ++
src/cairoint.h | 5 +++++
2 files changed, 7 insertions(+)
New commits:
commit d0119a5aa24a8b426ec64bb2eaa205b7f08ae58a
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Dec 20 12:30:35 2007 -0500
[cairo-unicode] Don't compile _cairo_utf8_to_utf16 on Linux
The _cairo_utf8_to_utf16() is only used in win32 and atsui font backends.
Don't build it if none of those two are available.
diff --git a/src/cairo-unicode.c b/src/cairo-unicode.c
index 2b224a3..18b9143 100644
--- a/src/cairo-unicode.c
+++ b/src/cairo-unicode.c
@@ -258,6 +258,7 @@ _cairo_utf8_to_ucs4 (const unsigned char *str,
return CAIRO_STATUS_SUCCESS;
}
+#if CAIRO_HAS_UTF8_TO_UTF16
/**
* _cairo_utf8_to_utf16:
* @str: an UTF-8 string
@@ -333,3 +334,4 @@ _cairo_utf8_to_utf16 (const unsigned char *str,
return CAIRO_STATUS_SUCCESS;
}
+#endif
diff --git a/src/cairoint.h b/src/cairoint.h
index 5924ab3..4f8213a 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -2311,11 +2311,16 @@ _cairo_utf8_to_ucs4 (const unsigned char *str,
uint32_t **result,
int *items_written);
+#if CAIRO_HAS_WIN32_FONT+0 || CAIRO_HAS_ATSUI_FONT+0
+# define CAIRO_HAS_UTF8_TO_UTF16 1
+#endif
+#if CAIRO_HAS_UTF8_TO_UTF16
cairo_private cairo_status_t
_cairo_utf8_to_utf16 (const unsigned char *str,
int len,
uint16_t **result,
int *items_written);
+#endif
cairo_private cairo_status_t
_cairo_error (cairo_status_t status);
More information about the cairo-commit
mailing list