X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=scripts%2Fgen_calc_cast.php;fp=scripts%2Fgen_calc_cast.php;h=901500866f620d86148434573a38503c48bcb54e;hp=0000000000000000000000000000000000000000;hb=52ed5940ed0ab3cafd36fbded2e83c92563e7b2b;hpb=acb84297d3ceeb57c97e0ac4da1881eba6aee18e diff --git a/scripts/gen_calc_cast.php b/scripts/gen_calc_cast.php new file mode 100644 index 0000000..9015008 --- /dev/null +++ b/scripts/gen_calc_cast.php @@ -0,0 +1,48 @@ + + + +static inline void psi_calc_cast(token_t in_type, impl_val *in_val, token_t out_type, impl_val *out_val) +{ + switch (out_type) { + $v) : ?> + + +#if HAVE_ + + + case PSI_T_: + switch (in_type) { + $v_in) : ?> + + +# if HAVE_ + + + case PSI_T_: + out_val-> = in_val->; + break; + + +# endif + + + + default: + assert(0); + break; + } + break; + + +#endif + + + + default: + assert(0); + break; + } +} +