changed hawk_val_t* to const hawk_val_t* in hawk_rtx_isstaticval(), hawk_rtx_getvaltype(), hawk_rtx_getvaltypename(), hawk_rtx_getintfromval()

This commit is contained in:
hyung-hwan 2023-06-27 13:18:09 +09:00
parent 0380496460
commit 2b702825ef
2 changed files with 12 additions and 12 deletions

View File

@ -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 * \return HAWK_TRUE if \a val is static, HAWK_FALSE if \a val is false
*/ */
HAWK_EXPORT int hawk_rtx_isstaticval ( HAWK_EXPORT int hawk_rtx_isstaticval (
hawk_rtx_t* rtx, /**< runtime context */ hawk_rtx_t* rtx, /**< runtime context */
hawk_val_t* val /**< value to check */ const hawk_val_t* val /**< value to check */
); );
HAWK_EXPORT int hawk_rtx_getvaltype ( HAWK_EXPORT int hawk_rtx_getvaltype (
hawk_rtx_t* rtx, hawk_rtx_t* rtx,
hawk_val_t* val const hawk_val_t* val
); );
HAWK_EXPORT const hawk_ooch_t* hawk_rtx_getvaltypename ( HAWK_EXPORT const hawk_ooch_t* hawk_rtx_getvaltypename (
hawk_rtx_t* rtx, hawk_rtx_t* rtx,
hawk_val_t* val const hawk_val_t* val
); );
HAWK_EXPORT int hawk_rtx_getintfromval ( HAWK_EXPORT int hawk_rtx_getintfromval (
hawk_rtx_t* rtx, hawk_rtx_t* rtx,
hawk_val_t* val const hawk_val_t* val
); );
/** /**

View File

@ -1419,17 +1419,17 @@ hawk_val_t* hawk_rtx_makefunval (hawk_rtx_t* rtx, const hawk_fun_t* fun)
return (hawk_val_t*)val; 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); 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); 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[] = 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)]; 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); return HAWK_RTX_GETINTFROMVAL(rtx, val);
} }