diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2011-08-09 00:23:58 +0200 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2011-08-09 00:23:58 +0200 |
commit | 944b2ba1ce076385f985212bbdf2df96a8a995f0 (patch) | |
tree | b277c13e2724e72f12c9c7c1a1afbabaf4edcdb3 | |
parent | de1e1cf9bccfd116d495804e230dc2e12b733a2d (diff) |
[buffer] Make API take signed int length
Since we already switched to accepting -1 as 'zero-terminated'.
-rw-r--r-- | src/hb-buffer.cc | 12 | ||||
-rw-r--r-- | src/hb-buffer.h | 12 | ||||
-rw-r--r-- | src/hb-ot-layout.cc | 2 | ||||
-rw-r--r-- | src/main.cc | 1 |
4 files changed, 12 insertions, 15 deletions
diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc index 53b32002..e0c86f58 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 1c4a9a7f..a43a8d16 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 d5829b0e..b05e4947 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 6fd5e1e1..e13a40d0 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" |