Using the function arguments

For type:
IS_STRING use arg1->value.str.val
IS_LONG       arg1->value.lval
IS_DOUBLE     arg1->value.dval