Coccinelle release-1.0.0-rc11
[bpt/coccinelle.git] / pycaml / ocamlobj.ml
CommitLineData
34e49164
C
1open Pycaml
2
3let foo_bar_print = pywrap_closure (fun x -> print_endline "hi" ; pynone ()) ;;
4let sd = pyimport_getmoduledict () ;;
5let mx = pymodule_new "CamlModule" ;;
6let cd = pydict_new () ;;
7let cx = pyclass_new (pynull (), cd, pystring_fromstring "CamlClass") ;;
8let cmx = pymethod_new (foo_bar_print,(pynull ()),cx) ;;
9let _ = pydict_setitemstring (cd, "CamlMethod", cmx) ;;
10let _ = pydict_setitemstring (pymodule_getdict mx, "CamlClass", cx) ;;
11let _ = pydict_setitemstring (sd, "CamlModule", mx) ;;
12let _ = pyrun_interactiveloop (0,"-") ;;