core: error: rename b_error_release to b_error_discard

This commit is contained in:
2025-11-04 10:03:10 +00:00
parent 5c6030488b
commit 6b65727535
3 changed files with 3 additions and 3 deletions

View File

@@ -471,7 +471,7 @@ enum b_status z__b_error_add_submsg_template(
return B_SUCCESS;
}
void b_error_release(struct b_error *error)
void b_error_discard(struct b_error *error)
{
b_queue_delete(&allocated_errors, &error->err_entry);
b_queue_push_back(&free_errors, &error->err_entry);

View File

@@ -372,7 +372,7 @@ BLUE_API enum b_status z__b_error_add_submsg_template(
error, type, msg_id, \
(b_error_template_parameter[]) {__VA_ARGS__, {}}))
BLUE_API void b_error_release(b_error *error);
BLUE_API void b_error_discard(b_error *error);
BLUE_API b_error_status_code b_error_get_status_code(const b_error *error);
BLUE_API const b_error_vendor *b_error_get_vendor(const b_error *error);

View File

@@ -68,7 +68,7 @@ struct _b_object *b_object_create(b_type type)
struct _b_object *out = NULL;
b_result result = b_object_instantiate(type_reg, &out);
if (b_result_is_error(result)) {
b_error_release(result);
b_error_discard(result);
return NULL;
}