--- old/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-blob.cc 2017-11-30 10:46:45.997458818 -0800 +++ new/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-blob.cc 2017-11-30 10:46:45.849458822 -0800 @@ -30,6 +30,7 @@ #endif #include "hb-private.hh" +#include "hb-debug.hh" #include "hb-object-private.hh" @@ -44,12 +45,6 @@ #include - -#ifndef HB_DEBUG_BLOB -#define HB_DEBUG_BLOB (HB_DEBUG+0) -#endif - - struct hb_blob_t { hb_object_header_t header; ASSERT_POD (); @@ -72,8 +67,8 @@ { if (blob->destroy) { blob->destroy (blob->user_data); - blob->user_data = NULL; - blob->destroy = NULL; + blob->user_data = nullptr; + blob->destroy = nullptr; } } @@ -128,6 +123,12 @@ return blob; } +static void +_hb_blob_destroy (void *data) +{ + hb_blob_destroy ((hb_blob_t *) data); +} + /** * hb_blob_create_sub_blob: * @parent: Parent blob. @@ -164,7 +165,7 @@ MIN (length, parent->length - offset), HB_MEMORY_MODE_READONLY, hb_blob_reference (parent), - (hb_destroy_func_t) hb_blob_destroy); + _hb_blob_destroy); return blob; } @@ -188,12 +189,12 @@ true, /* immutable */ - NULL, /* data */ + nullptr, /* data */ 0, /* length */ HB_MEMORY_MODE_READONLY, /* mode */ - NULL, /* user_data */ - NULL /* destroy */ + nullptr, /* user_data */ + nullptr /* destroy */ }; return const_cast (&_hb_blob_nil); @@ -247,7 +248,7 @@ * @destroy: callback to call when @data is not needed anymore. * @replace: whether to replace an existing data with the same key. * - * Return value: + * Return value: * * Since: 0.9.2 **/ @@ -266,9 +267,9 @@ * @blob: a blob. * @key: key for data to get. * - * * - * Return value: (transfer none): + * + * Return value: (transfer none): * * Since: 0.9.2 **/ @@ -284,7 +285,7 @@ * hb_blob_make_immutable: * @blob: a blob. * - * + * * * Since: 0.9.2 **/ @@ -301,7 +302,7 @@ * hb_blob_is_immutable: * @blob: a blob. * - * + * * * Return value: TODO * @@ -318,7 +319,7 @@ * hb_blob_get_length: * @blob: a blob. * - * + * * * Return value: the length of blob data in bytes. * @@ -335,9 +336,9 @@ * @blob: a blob. * @length: (out): * - * * - * Returns: (transfer none) (array length=length): + * + * Returns: (transfer none) (array length=length): * * Since: 0.9.2 **/ @@ -373,7 +374,7 @@ if (length) *length = 0; - return NULL; + return nullptr; } if (length)