From 944b2ba1ce076385f985212bbdf2df96a8a995f0 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 9 Aug 2011 00:23:58 +0200 Subject: [PATCH] [buffer] Make API take signed int length Since we already switched to accepting -1 as 'zero-terminated'. --- src/hb-buffer.cc | 12 ++++++------ src/hb-buffer.h | 12 ++++++------ src/hb-ot-layout.cc | 2 -- src/main.cc | 1 - 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc index 53b320021..e0c86f587 100644 --- a/src/hb-buffer.cc +++ b/src/hb-buffer.cc @@ -776,9 +776,9 @@ hb_utf8_next (const uint8_t *text, void hb_buffer_add_utf8 (hb_buffer_t *buffer, const char *text, - unsigned int text_length HB_UNUSED, + int text_length, unsigned int item_offset, - unsigned int item_length) + int item_length) { #define UTF_NEXT(S, E, U) hb_utf8_next (S, E, &(U)) ADD_UTF (uint8_t); @@ -810,9 +810,9 @@ hb_utf16_next (const uint16_t *text, void hb_buffer_add_utf16 (hb_buffer_t *buffer, const uint16_t *text, - unsigned int text_length HB_UNUSED, + int text_length, unsigned int item_offset, - unsigned int item_length) + int item_length) { #define UTF_NEXT(S, E, U) hb_utf16_next (S, E, &(U)) ADD_UTF (uint16_t); @@ -822,9 +822,9 @@ hb_buffer_add_utf16 (hb_buffer_t *buffer, void hb_buffer_add_utf32 (hb_buffer_t *buffer, const uint32_t *text, - unsigned int text_length HB_UNUSED, + int text_length, unsigned int item_offset, - unsigned int item_length) + int item_length) { #define UTF_NEXT(S, E, U) ((U) = *(S), (S)+1) ADD_UTF (uint32_t); diff --git a/src/hb-buffer.h b/src/hb-buffer.h index 1c4a9a7f5..a43a8d16d 100644 --- a/src/hb-buffer.h +++ b/src/hb-buffer.h @@ -147,23 +147,23 @@ hb_buffer_add (hb_buffer_t *buffer, void hb_buffer_add_utf8 (hb_buffer_t *buffer, const char *text, - unsigned int text_length, + int text_length, unsigned int item_offset, - unsigned int item_length); + int item_length); void hb_buffer_add_utf16 (hb_buffer_t *buffer, const uint16_t *text, - unsigned int text_length, + int text_length, unsigned int item_offset, - unsigned int item_length); + int item_length); void hb_buffer_add_utf32 (hb_buffer_t *buffer, const uint32_t *text, - unsigned int text_length, + int text_length, unsigned int item_offset, - unsigned int item_length); + int item_length); /* Clears any new items added at the end */ diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index d5829b0ea..b05e49479 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -26,8 +26,6 @@ * Red Hat Author(s): Behdad Esfahbod */ -#define HB_OT_LAYOUT_CC - #include "hb-ot-layout-private.hh" #include "hb-ot-layout-gdef-private.hh" diff --git a/src/main.cc b/src/main.cc index 6fd5e1e1d..e13a40d0f 100644 --- a/src/main.cc +++ b/src/main.cc @@ -24,7 +24,6 @@ * Red Hat Author(s): Behdad Esfahbod */ -#define HB_OT_LAYOUT_CC #include "hb-mutex-private.hh" #include "hb-open-file-private.hh" #include "hb-ot-layout-gdef-private.hh"