diff options
Diffstat (limited to 'lib/bindings.ml')
-rw-r--r-- | lib/bindings.ml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/bindings.ml b/lib/bindings.ml index 7f6cb76..1f7ef15 100644 --- a/lib/bindings.ml +++ b/lib/bindings.ml @@ -201,6 +201,15 @@ let show_diff cmds path c_ptr_l c_ptr_r = | CD.Incommensurable -> error_message := "Incommensurable"; "#1@" | CD.Empty_comparison -> error_message := "Empty comparison"; "#1@" +let tree_union c_ptr_l c_ptr_r = + let ct_l = Root.get c_ptr_l in + let ct_r = Root.get c_ptr_r in + try + let ct_ret = CD.tree_union ct_l ct_r in + Ctypes.Root.create ct_ret + with + CD.Nonexistent_child -> error_message := "Nonexistent child"; Ctypes.null + module Stubs(I : Cstubs_inverted.INTERNAL) = struct @@ -229,4 +238,5 @@ struct let () = I.internal "diff_tree" (string @-> (ptr void) @-> (ptr void) @-> returning (ptr void)) diff_tree let () = I.internal "trim_tree" ((ptr void) @-> (ptr void) @-> returning (ptr void)) trim_tree let () = I.internal "show_diff" (bool @-> string @-> (ptr void) @-> (ptr void) @-> returning string) show_diff + let () = I.internal "tree_union" ((ptr void) @-> (ptr void) @-> returning (ptr void)) tree_union end |