Add ASSERT_POD for most objects
diff --git a/src/hb-blob.cc b/src/hb-blob.cc
index f90f97e..3cc2d9d 100644
--- a/src/hb-blob.cc
+++ b/src/hb-blob.cc
@@ -48,6 +48,7 @@
struct _hb_blob_t {
hb_object_header_t header;
+ ASSERT_POD ();
bool immutable;
diff --git a/src/hb-buffer-private.hh b/src/hb-buffer-private.hh
index fb1c801..b539f26 100644
--- a/src/hb-buffer-private.hh
+++ b/src/hb-buffer-private.hh
@@ -44,11 +44,13 @@
hb_direction_t direction;
hb_script_t script;
hb_language_t language;
+ ASSERT_POD ();
} hb_segment_properties_t;
struct _hb_buffer_t {
hb_object_header_t header;
+ ASSERT_POD ();
/* Information about how the text in the buffer should be treated */
diff --git a/src/hb-font-private.hh b/src/hb-font-private.hh
index e10e105..91a4304 100644
--- a/src/hb-font-private.hh
+++ b/src/hb-font-private.hh
@@ -56,6 +56,7 @@
struct _hb_font_funcs_t {
hb_object_header_t header;
+ ASSERT_POD ();
hb_bool_t immutable;
@@ -87,6 +88,7 @@
struct _hb_face_t {
hb_object_header_t header;
+ ASSERT_POD ();
hb_bool_t immutable;
@@ -107,6 +109,7 @@
struct _hb_font_t {
hb_object_header_t header;
+ ASSERT_POD ();
hb_bool_t immutable;
diff --git a/src/hb-object-private.hh b/src/hb-object-private.hh
index e86a38d..96d1bd3 100644
--- a/src/hb-object-private.hh
+++ b/src/hb-object-private.hh
@@ -173,6 +173,8 @@
this ? ref_count.ref_count : 0);
}
+ private:
+ ASSERT_POD ();
};
diff --git a/src/hb-private.hh b/src/hb-private.hh
index 8f821f2..2ea0442 100644
--- a/src/hb-private.hh
+++ b/src/hb-private.hh
@@ -122,7 +122,7 @@
/* Check _assertion in a method environment */
#define _ASSERT_POD1(_line) \
inline void _static_assertion_on_line_##_line (void) const \
- { _ASSERT_INSTANCE_POD1 (*this); /* Make sure it's POD. */ }
+ { _ASSERT_INSTANCE_POD1 (_line, *this); /* Make sure it's POD. */ }
# define _ASSERT_POD0(_line) _ASSERT_POD1 (_line)
# define ASSERT_POD() _ASSERT_POD0 (__LINE__)
diff --git a/src/hb-set-private.hh b/src/hb-set-private.hh
index b8407e9..5cdf8a0 100644
--- a/src/hb-set-private.hh
+++ b/src/hb-set-private.hh
@@ -36,6 +36,9 @@
struct _hb_set_t
{
+ hb_object_header_t header;
+ ASSERT_POD ();
+
inline void init (void) {
header.init ();
clear ();
@@ -158,7 +161,6 @@
elt_t elt (hb_codepoint_t g) const { return elts[g >> SHIFT]; }
elt_t mask (hb_codepoint_t g) const { return elt_t (1) << (g & MASK); }
- hb_object_header_t header;
elt_t elts[ELTS]; /* XXX 8kb */
ASSERT_STATIC (sizeof (elt_t) * 8 == BITS);
diff --git a/src/hb-unicode-private.hh b/src/hb-unicode-private.hh
index 7f719c4..8a34174 100644
--- a/src/hb-unicode-private.hh
+++ b/src/hb-unicode-private.hh
@@ -63,6 +63,7 @@
struct _hb_unicode_funcs_t {
hb_object_header_t header;
+ ASSERT_POD ();
hb_unicode_funcs_t *parent;