core: move new object system to core module

this will allow a wider range of data structures (e.g. b_error, b_stream, b_stringstream) to make use
of the new object system, and other modules and library users can use the object system without
depending on the blue-object or blue-ds modules.

blue-ds will become a simple library of data structures (string, hashmap, etc), built on top of the
core object system.
This commit is contained in:
2025-10-15 10:38:18 +01:00
parent 2108277061
commit 9d2ebfce2e
11 changed files with 19 additions and 19 deletions

19
core/object.h Normal file
View File

@@ -0,0 +1,19 @@
#ifndef _OBJECT_H_
#define _OBJECT_H_
#include <blue/core/error.h>
#include <blue/core/misc.h>
#include <stdint.h>
struct b_type_registration;
struct _b_object {
uint64_t obj_magic;
const struct b_type_registration *obj_type;
unsigned int obj_ref, obj_main_priv_offset;
};
extern b_result b_object_instantiate(
struct b_type_registration *type, struct _b_object **out);
#endif