/trunk/Examples/ocaml/strings_test/runme.ml
OCaml | 17 lines | 14 code | 2 blank | 1 comment | 0 complexity | f7f31c437c9820603a1bbea0f71ba6dc MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- (* This example is meant to reach every case in cstring.i *)
- open Swig
- open Example
- let _ = _takes_std_string (C_string "foo")
- let _ = print_endline
- ("_gives_std_string <<" ^ (get_string (_gives_std_string C_void)) ^ " >>")
- let _ = _takes_char_ptr (C_string "bar")
- let _ = print_endline
- ("_gives_char_ptr << " ^ (get_string (_gives_char_ptr C_void)) ^ " >>")
- let _ = print_endline
- ("_takes_and_gives_std_string << " ^
- (get_string (_takes_and_gives_std_string (C_string "foo"))) ^ " >>")
- let _ = print_endline
- ("_takes_and_gives_char_ptr << " ^
- (get_string (_takes_and_gives_char_ptr (C_string "bar.bar"))) ^ " >>")