- struct psi_call_frame *frame, HashTable *defs);
-
-#include <assert.h>
-
-static inline zend_long psi_long_num_exp(struct psi_num_exp *exp,
- struct psi_call_frame *frame, HashTable *defs) {
- impl_val val = {0};
-
- switch (psi_num_exp_exec(exp, &val, frame, defs)) {
- case PSI_T_UINT8: return val.u8;
- case PSI_T_UINT16: return val.u16;
- case PSI_T_UINT32: return val.u32;
- case PSI_T_UINT64: return val.u64; /* FIXME */
- case PSI_T_INT8: return val.i8;
- case PSI_T_INT16: return val.i16;
- case PSI_T_INT32: return val.i32;
- case PSI_T_INT64: return val.i64;
- case PSI_T_FLOAT: return val.fval;
- case PSI_T_DOUBLE: return val.dval;
- default:
- assert(0);
- }
- return 0;
+ struct psi_call_frame *frame, struct psi_cpp *cpp);
+
+struct psi_plist *psi_num_exp_tokens(struct psi_num_exp *exp,
+ struct psi_plist *list);
+
+
+#include "calc.h"
+static inline zend_long psi_num_exp_get_long(struct psi_num_exp *exp,
+ struct psi_call_frame *frame, struct psi_cpp *cpp) {
+ impl_val res = {0};
+
+ psi_calc_cast(psi_num_exp_exec(exp, &res, frame, cpp), &res,
+ PSI_T_INT64, &res);
+
+ return res.i64;