swig/Examples/ocaml/strings_test/runme.ml
Art Yerkes e0dca0ec65 shapes example: slight correction to depth map.
makedebugtop: include swig.cmo
Lib: factored out more common code, slightly reorganized class type.
     added director define and exceptions.
     std_string: length from the original ocaml string (no longer depends on
      null termination)
     ocamldec.swg/ocaml.swg: added caml_string_len
Examples/Makefile.in: quiet about checking out files.
Ocaml.cxx:
     Fixed abstract director test case.
     Include/exclude director.swg based on directors being enabled.
Final edits for 1.3.20, barring bugs being discovered.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5477 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-04 06:15:07 +00:00

17 lines
634 B
OCaml

(* 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"))) ^ " >>")