diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c2e4145..335ed677 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,7 +25,7 @@ `pow(..)`, `sin(..)`, `sqrt(..)` and `tan(..)`. * Added mathematical constants `MATH_E` and `MATH_PI` with corresponding values. * libcleri is now integrated into the core ThingsDB codebase, eliminating the need for separate installation. -* The `new_backup()` function no longer accepts an `int`, `float` or `str` as start time. +* The `new_backup()` and `new_token()` functions no longer accept `int`, `float` or `str` as time. _(This was marked as deprecated since v0.10.1)_ # v1.4.16 diff --git a/inc/ti/fn/fnnewtoken.h b/inc/ti/fn/fnnewtoken.h index 84753753..5c32f5d9 100644 --- a/inc/ti/fn/fnnewtoken.h +++ b/inc/ti/fn/fnnewtoken.h @@ -60,51 +60,6 @@ static int do__f_new_token(ti_query_t * query, cleri_node_t * nd, ex_t * e) exp_time = (uint64_t) ts; } - else if (ti_val_is_float(query->rval)) - { - log_warning( - "parsing type `float` to `new_token(..)` as second argument " - "is obsolete, use type `datetime` or type `timeval` instead"); - double now = util_now(); - double ts = VFLOAT(query->rval); - if (ts < now) - goto errpast; - if (ts > TI_MAX_EXPIRATION_DOUBLE) - goto errfuture; - - exp_time = (uint64_t) ts; - } - else if (ti_val_is_int(query->rval)) - { - log_warning( - "parsing type `int` to `new_token(..)` as second argument " - "is obsolete, use type `datetime` or type `timeval` instead"); - int64_t now = (int64_t) util_now_usec(); - int64_t ts = VINT(query->rval); - if (ts < now) - goto errpast; - if (ts > TI_MAX_EXPIRATION_LONG) - goto errfuture; - - exp_time = (uint64_t) ts; - } - else if (ti_val_is_str(query->rval)) - { - log_warning( - "parsing type `str` to `new_token(..)` as second argument " - "is obsolete, use type `datetime` or type `timeval` instead"); - int64_t now = (int64_t) util_now_usec(); - ti_raw_t * rt = (ti_raw_t *) query->rval; - int64_t ts = iso8601_parse_date_n((const char *) rt->data, rt->n); - if (ts < 0) - goto errinvalid; - if (ts < now) - goto errpast; - if (ts > TI_MAX_EXPIRATION_LONG) - goto errfuture; - - exp_time = (uint64_t) ts; - } else if (!ti_val_is_nil(query->rval)) { ex_set(e, EX_TYPE_ERROR, @@ -114,7 +69,6 @@ static int do__f_new_token(ti_query_t * query, cleri_node_t * nd, ex_t * e) ti_val_str(query->rval)); return e->nr; } - } if (nargs > 2) diff --git a/inc/ti/version.h b/inc/ti/version.h index 6a5359bd..cade3ac0 100644 --- a/inc/ti/version.h +++ b/inc/ti/version.h @@ -25,7 +25,7 @@ * "-rc0" * "" */ -#define TI_VERSION_PRE_RELEASE "-alpha6" +#define TI_VERSION_PRE_RELEASE "-alpha7" #define TI_MAINTAINER \ "Jeroen van der Heijden " diff --git a/src/cleri/ref.c b/src/cleri/ref.c index 991b0711..a55a85b9 100644 --- a/src/cleri/ref.c +++ b/src/cleri/ref.c @@ -49,5 +49,5 @@ void cleri_ref_set(cleri_t * ref, cleri_t * cl_obj) */ static void ref__free(cleri_t * cl_object __attribute__((unused))) { - /* nothing todo */ + /* nothing, this just must exist */ }