src/java.desktop/share/native/libfontmanager/harfbuzz/hb-object-private.hh
changeset 48274 51772bf1fb0c
parent 47216 71c04702a3d5
child 50826 f5b95be8b6e2
equal deleted inserted replaced
48273:e2065f7505eb 48274:51772bf1fb0c
    31 
    31 
    32 #ifndef HB_OBJECT_PRIVATE_HH
    32 #ifndef HB_OBJECT_PRIVATE_HH
    33 #define HB_OBJECT_PRIVATE_HH
    33 #define HB_OBJECT_PRIVATE_HH
    34 
    34 
    35 #include "hb-private.hh"
    35 #include "hb-private.hh"
       
    36 #include "hb-debug.hh"
    36 
    37 
    37 #include "hb-atomic-private.hh"
    38 #include "hb-atomic-private.hh"
    38 #include "hb-mutex-private.hh"
    39 #include "hb-mutex-private.hh"
    39 
       
    40 
       
    41 /* Debug */
       
    42 
       
    43 #ifndef HB_DEBUG_OBJECT
       
    44 #define HB_DEBUG_OBJECT (HB_DEBUG+0)
       
    45 #endif
       
    46 
    40 
    47 
    41 
    48 /* reference_count */
    42 /* reference_count */
    49 
    43 
    50 #define HB_REFERENCE_COUNT_INERT_VALUE -1
    44 #define HB_REFERENCE_COUNT_INERT_VALUE -1
   191 template <typename Type>
   185 template <typename Type>
   192 static inline void *hb_object_get_user_data (Type               *obj,
   186 static inline void *hb_object_get_user_data (Type               *obj,
   193                                              hb_user_data_key_t *key)
   187                                              hb_user_data_key_t *key)
   194 {
   188 {
   195   if (unlikely (!obj || hb_object_is_inert (obj)))
   189   if (unlikely (!obj || hb_object_is_inert (obj)))
   196     return NULL;
   190     return nullptr;
   197   assert (hb_object_is_valid (obj));
   191   assert (hb_object_is_valid (obj));
   198   return obj->header.user_data.get (key);
   192   return obj->header.user_data.get (key);
   199 }
   193 }
   200 
   194 
   201 
   195