Use newSVnv in sv_of_float to stop it truncating the float to an int.
[perl4caml.git] / test / 030-call.ml
1 (* Basic subroutine call.
2  * $Id: 030-call.ml,v 1.1 2005-01-28 23:09:33 rich Exp $
3  *)
4
5 open Perl
6
7 let () =
8   ignore (eval "sub test { 42 + $_[0] }");
9   let sv = call ~fn:"test" [sv_of_int 10] in
10   assert (52 = int_of_sv sv);;
11
12 Gc.full_major ()