cast.c
470 Bytes
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <string.h>
#include <expValue.h>
#include <cast.h>
s_expVal *
castExprToInt(s_expVal * eVal)
{
return expValueIntNew(expValueInt (eVal));
}
s_expVal *
castExprToFloat(s_expVal * eVal)
{
return expValueFloatNew(expValueFloat (eVal));
}
s_expVal *
castExprToString(s_expVal * eVal)
{
char * val = expValueString(eVal);
s_expVal * ret = expValueStringNew(val);
free(val);
return ret;
}