提交 944b2ba1 编写于 作者: B Behdad Esfahbod

[buffer] Make API take signed int length

Since we already switched to accepting -1 as 'zero-terminated'.
上级 de1e1cf9
......@@ -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);
......
......@@ -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 */
......
......@@ -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"
......
......@@ -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"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册