object: to_string() now takes a const object pointer

This commit is contained in:
2025-09-22 10:47:33 +01:00
parent 16b68b6fba
commit d9041cda3f
7 changed files with 11 additions and 11 deletions

View File

@@ -10,7 +10,7 @@ typedef int (*number_converter_t)(const struct b_number *, void *);
static number_converter_t converters[B_NUMBER_TYPE_COUNT][B_NUMBER_TYPE_COUNT];
static void number_to_string(struct b_object *obj, struct b_stream *out);
static void number_to_string(const struct b_object *obj, struct b_stream *out);
static struct b_object_type number_type = {
.t_name = "corelib::number",
@@ -175,7 +175,7 @@ size_t b_number_data_size(const struct b_number *number)
}
}
static void number_to_string(struct b_object *obj, struct b_stream *out)
static void number_to_string(const struct b_object *obj, struct b_stream *out)
{
struct b_number *number = B_NUMBER(obj);
switch (number->n_type) {