Merge branch 'ZackerySpytz-OCaml-classDirectorMethod-CAMLreturn'
* ZackerySpytz-OCaml-classDirectorMethod-CAMLreturn: [OCaml] Fix possible GC issues in generated director code Conflicts: Examples/test-suite/ocaml/director_unroll_runme.ml
This commit is contained in:
commit
9ab873f432
2 changed files with 15 additions and 16 deletions
|
|
@ -3,17 +3,13 @@ open Director_unroll
|
|||
|
||||
let director_unroll_MyFoo ob meth args =
|
||||
match meth with
|
||||
| "ping" -> C_string "director_unroll_MyFoo::ping()"
|
||||
| "ping" -> C_string "MyFoo::ping()"
|
||||
| _ -> (invoke ob) meth args
|
||||
|
||||
let a =
|
||||
new_derived_object
|
||||
new_Foo (director_unroll_MyFoo) '()
|
||||
let a = new_derived_object
|
||||
new_Foo (director_unroll_MyFoo) '()
|
||||
|
||||
let _ =
|
||||
let b = new_Bar '() in
|
||||
let _ = b -> set (a) in
|
||||
let c = b -> get () in
|
||||
assert (director_unroll_MyFoo c "ping" '() as string =
|
||||
"director_unroll_MyFoo::ping()");
|
||||
;;
|
||||
let b = new_Bar '()
|
||||
let _ = b -> set (a)
|
||||
let c = b -> get ()
|
||||
let _ = assert ((a -> "&" () as int) = (c -> "&" () as int))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue