feat(lander): implement placeholder keys
All checks were successful
ci/woodpecker/push/build Pipeline was successful
All checks were successful
ci/woodpecker/push/build Pipeline was successful
This commit is contained in:
parent
4d9dfff27e
commit
3952496378
7 changed files with 123 additions and 14 deletions
|
|
@ -56,7 +56,8 @@ lsm_error lsm_entry_attr_get_uint8_t(uint8_t *out, lsm_entry_handle *handle,
|
|||
uint8_t type);
|
||||
|
||||
/**
|
||||
* Add a new attribute to the entry.
|
||||
* Add a new attribute to the entry. This overwrites an existing version of this
|
||||
* attribute.
|
||||
*
|
||||
* @param entry entry to modify
|
||||
* @param type type of attribute to add
|
||||
|
|
|
|||
|
|
@ -211,8 +211,10 @@ lsm_error lsm_entry_attr_remove(lsm_str **out, lsm_entry_handle *handle,
|
|||
|
||||
lsm_error lsm_entry_attr_insert(lsm_entry_handle *handle, uint8_t type,
|
||||
lsm_str *data) {
|
||||
if (lsm_entry_attr_present(handle, type)) {
|
||||
return lsm_error_already_present;
|
||||
// Remove a previous version of the attribute
|
||||
lsm_str *out;
|
||||
if (lsm_entry_attr_remove(&out, handle, type) == lsm_error_ok) {
|
||||
lsm_str_free(out);
|
||||
}
|
||||
|
||||
lsm_entry *entry = handle->wrapper->entry;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue