core: rename b_retain/b_release to b_object_ref/b_object_unref

This commit is contained in:
2025-10-18 21:51:51 +01:00
parent 6b5f0319c3
commit 4044961478
2 changed files with 5 additions and 4 deletions

View File

@@ -108,16 +108,17 @@ void *b_object_get_interface(struct _b_object *object, b_type type)
return z__b_class_get_interface(object->obj_type->r_class, type);
}
struct _b_object *b_retain(struct _b_object *p)
struct _b_object *b_object_ref(struct _b_object *p)
{
p->obj_ref++;
return p;
}
void b_release(struct _b_object *p)
void b_object_unref(struct _b_object *p)
{
if (p->obj_ref > 1) {
p->obj_ref--;
return;
}
p->obj_ref = 0;