core: remove type parameter from object interface query functions

This commit is contained in:
2025-10-18 21:06:20 +01:00
parent c8b8111487
commit a0b7b5b85b
3 changed files with 10 additions and 18 deletions

View File

@@ -111,16 +111,16 @@
#define B_CLASS_DISPATCH_VIRTUAL(type_name, type_id, object, func, ...) \
do { \
type_name##_class *iface = b_object_get_interface( \
object, type_name##_class, type_id); \
type_name##_class *iface \
= b_object_get_interface(object, type_id); \
if (iface && iface->func) { \
return iface->func(__VA_ARGS__); \
} \
} while (0)
#define B_CLASS_DISPATCH_VIRTUAL_V(type_name, type_id, object, func, ...) \
do { \
type_name##_class *iface = b_object_get_interface( \
object, type_name##_class, type_id); \
type_name##_class *iface \
= b_object_get_interface(object, type_id); \
if (iface && iface->func) { \
iface->func(__VA_ARGS__); \
return; \

View File

@@ -18,19 +18,11 @@ typedef struct _b_object_class {
void (*to_string)(b_object *, struct b_stream *);
} b_object_class;
#define b_object_get_private(object, private_struct, type_id) \
((private_struct *)z__b_object_get_private(B_OBJECT(object), type_id));
#define b_object_get_protected(object, protected_struct, type_id) \
((protected_struct *)z__b_object_get_protected(B_OBJECT(object), type_id));
#define b_object_get_interface(object, interface_struct, interface_id) \
((interface_struct *)z__b_object_get_interface( \
B_OBJECT(object), interface_id));
BLUE_API b_type b_object_get_type(void);
BLUE_API void *z__b_object_get_private(b_object *object, b_type type);
BLUE_API void *z__b_object_get_protected(b_object *object, b_type type);
BLUE_API void *z__b_object_get_interface(b_object *object, b_type type);
BLUE_API void *b_object_get_private(b_object *object, b_type type);
BLUE_API void *b_object_get_protected(b_object *object, b_type type);
BLUE_API void *b_object_get_interface(b_object *object, b_type type);
b_object *b_retain(b_object *p);
BLUE_API void b_release(b_object *p);