Further support for floating-point. Literals with exponents work

and literals with the 'f32' or 'f64' suffixes work as well. In
addition, logging things with the f32 or f64 type works. (float is
still assumed to be a synonym for f64).
This commit is contained in:
Tim Chevalier
2011-03-22 17:25:40 -07:00
committed by Graydon Hoare
parent d56971d5b4
commit 23e23bd762
10 changed files with 153 additions and 26 deletions

View File

@@ -40,7 +40,14 @@ void upcall_log_int(rust_task *task, int32_t i) {
}
extern "C" CDECL
void upcall_log_float(rust_task *task, double *f) {
void upcall_log_float(rust_task *task, float f) {
LOG_UPCALL_ENTRY(task);
task->log(rust_log::UPCALL | rust_log::ULOG,
"rust: %12.12f", f);
}
extern "C" CDECL
void upcall_log_double(rust_task *task, double *f) {
LOG_UPCALL_ENTRY(task);
task->log(rust_log::UPCALL | rust_log::ULOG,
"rust: %12.12f", *f);