[buffer] Make API take signed int length
Since we already switched to accepting -1 as 'zero-terminated'.
diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc
index 53b3200..e0c86f5 100644
--- a/src/hb-buffer.cc
+++ b/src/hb-buffer.cc
@@ -776,9 +776,9 @@
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 @@
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 @@
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 1c4a9a7..a43a8d1 100644
--- a/src/hb-buffer.h
+++ b/src/hb-buffer.h
@@ -147,23 +147,23 @@
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 d5829b0..b05e494 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 6fd5e1e..e13a40d 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"