meta: rename legacy object module to 'ds'

This commit is contained in:
2025-08-09 19:57:42 +01:00
parent a5e3e06306
commit 0751ef469f
80 changed files with 460 additions and 460 deletions

View File

@@ -3,7 +3,7 @@
#include <blue/core/stringstream.h>
#include <blue/io/file.h>
#include <blue/io/path.h>
#include <blue/object/string.h>
#include <blue/ds/string.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
@@ -13,17 +13,17 @@
#include <unistd.h>
struct b_path {
struct b_object base;
struct b_dsref base;
struct b_string *pathstr;
};
static void path_release(struct b_object *obj);
static void path_to_string(struct b_object *obj, struct b_stream *out);
static void path_release(struct b_dsref *obj);
static void path_to_string(struct b_dsref *obj, struct b_stream *out);
static struct b_object_type path_type = {
static struct b_dsref_type path_type = {
.t_name = "corelib::path",
.t_flags = B_OBJECT_FUNDAMENTAL,
.t_id = B_OBJECT_TYPE_PATH,
.t_flags = B_DSREF_FUNDAMENTAL,
.t_id = B_DSREF_TYPE_PATH,
.t_instance_size = sizeof(struct b_path),
.t_release = path_release,
.t_to_string = path_to_string,
@@ -32,7 +32,7 @@ static struct b_object_type path_type = {
struct b_path *b_path_create()
{
struct b_path *path
= (struct b_path *)b_object_type_instantiate(&path_type);
= (struct b_path *)b_dsref_type_instantiate(&path_type);
if (!path) {
return NULL;
}
@@ -305,14 +305,14 @@ size_t b_path_length(const struct b_path *path)
return b_string_get_size(path->pathstr, B_STRLEN_NORMAL);
}
void path_release(struct b_object *obj)
void path_release(struct b_dsref *obj)
{
struct b_path *path = (struct b_path *)obj;
b_string_release(path->pathstr);
}
void path_to_string(struct b_object *obj, struct b_stream *out)
void path_to_string(struct b_dsref *obj, struct b_stream *out)
{
struct b_path *path = (struct b_path *)obj;