summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/harfbuzz-ng/src/hb-blob.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-blob.cc')
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-blob.cc27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-blob.cc b/src/3rdparty/harfbuzz-ng/src/hb-blob.cc
index fb48f03cab..59c8333637 100644
--- a/src/3rdparty/harfbuzz-ng/src/hb-blob.cc
+++ b/src/3rdparty/harfbuzz-ng/src/hb-blob.cc
@@ -30,6 +30,7 @@
#endif
#include "hb-private.hh"
+#include "hb-debug.hh"
#include "hb-object-private.hh"
@@ -44,12 +45,6 @@
#include <errno.h>
-
-#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 @@ _hb_blob_destroy_user_data (hb_blob_t *blob)
{
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 @@ hb_blob_create (const char *data,
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 @@ hb_blob_create_sub_blob (hb_blob_t *parent,
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 @@ hb_blob_get_empty (void)
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_t *> (&_hb_blob_nil);
@@ -373,7 +374,7 @@ hb_blob_get_data_writable (hb_blob_t *blob, unsigned int *length)
if (length)
*length = 0;
- return NULL;
+ return nullptr;
}
if (length)