summaryrefslogtreecommitdiffstats
path: root/java/run-java-tests
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2010-10-03 21:18:25 +0100
committerRichard W.M. Jones <rjones@redhat.com>2010-10-03 21:18:25 +0100
commit67636f721056d2f2250b0ff8acd981a0294536a9 (patch)
tree6282c9c86f8af6823a22e436b2a95751f36b3b22 /java/run-java-tests
parent1a3324ea2b0f4a4e04f99c4efb5af1d4cc256731 (diff)
downloadlibguestfs-67636f721056d2f2250b0ff8acd981a0294536a9.tar.gz
libguestfs-67636f721056d2f2250b0ff8acd981a0294536a9.tar.xz
libguestfs-67636f721056d2f2250b0ff8acd981a0294536a9.zip
ocaml: Add alternate object-oriented programming style.
In original style: let () = let filename = Sys.argv.(1) in let g = Guestfs.create () in Guestfs.add_drive_ro g filename; Guestfs.launch g; let roots = Guestfs.inspect_os g in print_endline (Guestfs.inspect_get_product_name g roots.(0)) The same code in the new OO style: let () = let filename = Sys.argv.(1) in let g = new Guestfs.guestfs in g#add_drive_ro filename; g#launch (); let roots = g#inspect_os () in print_endline (g#inspect_get_product_name roots.(0))
Diffstat (limited to 'java/run-java-tests')
0 files changed, 0 insertions, 0 deletions