actube/src/cw/cw_ktv_cast.c

15 lines
224 B
C
Raw Normal View History

2022-07-31 17:15:32 +02:00
#include "val.h"
2022-07-31 17:15:32 +02:00
cw_Val_t * cw_ktv_cast(cw_Val_t *v,const cw_Type_t * type)
{
if (strcmp(v->type->name,type->name)==0)
return v;
if (type->cast==NULL)
return NULL;
if (!type->cast(v))
return NULL;
return v;
}