fx.collections: update interface implementations

This commit is contained in:
2026-05-25 17:30:08 +01:00
parent 0be82c63fa
commit 97fe00d4a1
4 changed files with 141 additions and 94 deletions
+10 -2
View File
@@ -1,6 +1,7 @@
#include <fx/collections/datetime.h>
#include <fx/stream.h>
#include <fx/string.h>
#include <fx/value.h>
/*** PRIVATE DATA *************************************************************/
@@ -566,9 +567,14 @@ static void datetime_fini(fx_object *obj, void *priv)
struct fx_datetime_p *dt = priv;
}
static void _datetime_to_string(const fx_object *obj, fx_stream *out)
static fx_status _datetime_to_string(
const fx_value *obj,
fx_stream *out,
const char *format)
{
struct fx_datetime_p *dt = fx_object_get_private(obj, FX_TYPE_DATETIME);
struct fx_datetime_p *dt = fx_object_get_private(
obj->v_object,
FX_TYPE_DATETIME);
if (dt->dt_has_date) {
fx_stream_write_fmt(
@@ -607,6 +613,8 @@ static void _datetime_to_string(const fx_object *obj, fx_stream *out)
dt->dt_zone_offset_minute);
}
}
return FX_SUCCESS;
}
/*** CLASS DEFINITION *********************************************************/