A first stab at the 'nbody' demo, with support for calling C sqrt().

This commit is contained in:
Lindsey Kuper
2011-03-24 18:20:49 -07:00
committed by Graydon Hoare
parent 0b9cf7902c
commit bcc104ce79
5 changed files with 219 additions and 1 deletions

View File

@@ -51,6 +51,11 @@ last_os_error(rust_task *task) {
return st;
}
extern "C" CDECL
void squareroot(rust_task *task, double *input, double *output) {
*output = sqrt(*input);
}
extern "C" CDECL size_t
size_of(rust_task *task, type_desc *t) {
return t->size;