prop_bt* prop_area::new_prop_bt(const char* name, uint32_t namelen, uint_least32_t* const off) { uint_least32_t new_offset; void* const p = allocate_obj(sizeof(prop_bt) + namelen + 1, &new_offset); if (p != nullptr) { prop_bt* bt = new (p) prop_bt(name, namelen); *off = new_offset; return bt; } return nullptr; }
static prop_bt *new_prop_bt(const char *name, uint8_t namelen, uint32_t *const off) { uint32_t new_offset; void *const offset = allocate_obj(sizeof(prop_bt) + namelen + 1, &new_offset); if (offset) { prop_bt* bt = new(offset) prop_bt(name, namelen); *off = new_offset; return bt; } return NULL; }
prop_info* prop_area::new_prop_info(const char* name, uint32_t namelen, const char* value, uint32_t valuelen, uint_least32_t* const off) { uint_least32_t new_offset; void* const p = allocate_obj(sizeof(prop_info) + namelen + 1, &new_offset); if (p != nullptr) { prop_info* info = new (p) prop_info(name, namelen, value, valuelen); *off = new_offset; return info; } return nullptr; }
static prop_info *new_prop_info(const char *name, uint8_t namelen, const char *value, uint8_t valuelen, uint32_t *const off) { uint32_t off_tmp; void* const offset = allocate_obj(sizeof(prop_info) + namelen + 1, &off_tmp); if (offset) { prop_info* info = new(offset) prop_info(name, namelen, value, valuelen); *off = off_tmp; return info; } return NULL; }