diff --git a/lib/hawk.h b/lib/hawk.h index f9a15eb3..9e454f39 100644 --- a/lib/hawk.h +++ b/lib/hawk.h @@ -3148,23 +3148,23 @@ HAWK_EXPORT hawk_val_t* hawk_rtx_makefunval ( * \return HAWK_TRUE if \a val is static, HAWK_FALSE if \a val is false */ HAWK_EXPORT int hawk_rtx_isstaticval ( - hawk_rtx_t* rtx, /**< runtime context */ - hawk_val_t* val /**< value to check */ + hawk_rtx_t* rtx, /**< runtime context */ + const hawk_val_t* val /**< value to check */ ); HAWK_EXPORT int hawk_rtx_getvaltype ( - hawk_rtx_t* rtx, - hawk_val_t* val + hawk_rtx_t* rtx, + const hawk_val_t* val ); HAWK_EXPORT const hawk_ooch_t* hawk_rtx_getvaltypename ( - hawk_rtx_t* rtx, - hawk_val_t* val + hawk_rtx_t* rtx, + const hawk_val_t* val ); HAWK_EXPORT int hawk_rtx_getintfromval ( - hawk_rtx_t* rtx, - hawk_val_t* val + hawk_rtx_t* rtx, + const hawk_val_t* val ); /** diff --git a/lib/val.c b/lib/val.c index b54d93f7..e14f8376 100644 --- a/lib/val.c +++ b/lib/val.c @@ -1419,17 +1419,17 @@ hawk_val_t* hawk_rtx_makefunval (hawk_rtx_t* rtx, const hawk_fun_t* fun) return (hawk_val_t*)val; } -int HAWK_INLINE hawk_rtx_isstaticval (hawk_rtx_t* rtx, hawk_val_t* val) +int HAWK_INLINE hawk_rtx_isstaticval (hawk_rtx_t* rtx, const hawk_val_t* val) { return HAWK_VTR_IS_POINTER(val) && HAWK_IS_STATICVAL(val); } -int hawk_rtx_getvaltype (hawk_rtx_t* rtx, hawk_val_t* val) +int hawk_rtx_getvaltype (hawk_rtx_t* rtx, const hawk_val_t* val) { return HAWK_RTX_GETVALTYPE(rtx, val); } -const hawk_ooch_t* hawk_rtx_getvaltypename(hawk_rtx_t* rtx, hawk_val_t* val) +const hawk_ooch_t* hawk_rtx_getvaltypename(hawk_rtx_t* rtx, const hawk_val_t* val) { static const hawk_ooch_t* __val_type_name[] = { @@ -1452,7 +1452,7 @@ const hawk_ooch_t* hawk_rtx_getvaltypename(hawk_rtx_t* rtx, hawk_val_t* val) return __val_type_name[HAWK_RTX_GETVALTYPE(rtx, val)]; } -int hawk_rtx_getintfromval (hawk_rtx_t* rtx, hawk_val_t* val) +int hawk_rtx_getintfromval (hawk_rtx_t* rtx, const hawk_val_t* val) { return HAWK_RTX_GETINTFROMVAL(rtx, val); }