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

@@ -5,7 +5,7 @@
#include <blue/io/directory.h>
#include <blue/io/file.h>
#include <blue/io/path.h>
#include <blue/object/string.h>
#include <blue/ds/string.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
@@ -15,18 +15,18 @@
#include <unistd.h>
struct b_file {
struct b_object base;
struct b_dsref base;
enum b_file_mode mode;
int fd;
struct b_path *path;
};
static void file_release(struct b_object *obj);
static void file_release(struct b_dsref *obj);
static struct b_object_type file_type = {
static struct b_dsref_type file_type = {
.t_name = "corelib::file",
.t_flags = B_OBJECT_FUNDAMENTAL,
.t_id = B_OBJECT_TYPE_FILE,
.t_flags = B_DSREF_FUNDAMENTAL,
.t_id = B_DSREF_TYPE_FILE,
.t_instance_size = sizeof(struct b_file),
.t_release = file_release,
};
@@ -104,7 +104,7 @@ b_result b_file_open(
}
struct b_file *file
= (struct b_file *)b_object_type_instantiate(&file_type);
= (struct b_file *)b_dsref_type_instantiate(&file_type);
if (!file) {
close(fd);
b_path_release(abs_path);
@@ -482,7 +482,7 @@ enum b_status b_file_write(
return status;
}
static void file_release(struct b_object *obj)
static void file_release(struct b_dsref *obj)
{
struct b_file *file = (struct b_file *)obj;
close(file->fd);