-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
78 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,48 @@ | ||
|
||
module Animal = struct | ||
type nonrec t = [ `Ocaml_rs_smartptr_test_stubs_animal_proxy|`Core_marker_send ] Ocaml_rs_smartptr.Rusty_obj.t | ||
external name : t -> string = "animal_name" | ||
external noise : t -> string = "animal_noise" | ||
external talk : t -> unit = "animal_talk" | ||
module Animal = struct | ||
type tags = | ||
[ `Ocaml_rs_smartptr_test_stubs_animal_proxy | ||
| `Core_marker_send | ||
] | ||
|
||
type 'a t' = ([> tags ] as 'a) Ocaml_rs_smartptr.Rusty_obj.t | ||
type t = tags t' | ||
|
||
external name : _ t' -> string = "animal_name" | ||
external noise : _ t' -> string = "animal_noise" | ||
external talk : _ t' -> unit = "animal_talk" | ||
end | ||
|
||
module Sheep = struct | ||
type tags = | ||
[ `Ocaml_rs_smartptr_test_stubs_sheep | ||
| `Core_marker_sync | ||
| `Core_marker_send | ||
| `Ocaml_rs_smartptr_test_stubs_animal_proxy | ||
] | ||
|
||
module Sheep = struct | ||
type nonrec t = [ `Ocaml_rs_smartptr_test_stubs_sheep|`Core_marker_sync|`Core_marker_send|`Ocaml_rs_smartptr_test_stubs_animal_proxy ] Ocaml_rs_smartptr.Rusty_obj.t | ||
external create : string -> t = "sheep_create" | ||
external is_naked : t -> bool = "sheep_is_naked" | ||
external sheer : t -> unit = "sheep_sheer" | ||
end | ||
|
||
type 'a t' = ([> tags ] as 'a) Ocaml_rs_smartptr.Rusty_obj.t | ||
type t = tags t' | ||
|
||
module Wolf = struct | ||
type nonrec t = [ `Ocaml_rs_smartptr_test_stubs_wolf|`Core_marker_sync|`Core_marker_send|`Ocaml_rs_smartptr_test_stubs_animal_proxy ] Ocaml_rs_smartptr.Rusty_obj.t | ||
external create : string -> t = "wolf_create" | ||
external set_hungry : t -> bool -> unit = "wolf_set_hungry" | ||
external create : string -> _ t' = "sheep_create" | ||
external is_naked : _ t' -> bool = "sheep_is_naked" | ||
external sheer : _ t' -> unit = "sheep_sheer" | ||
end | ||
|
||
module Wolf = struct | ||
type tags = | ||
[ `Ocaml_rs_smartptr_test_stubs_wolf | ||
| `Core_marker_sync | ||
| `Core_marker_send | ||
| `Ocaml_rs_smartptr_test_stubs_animal_proxy | ||
] | ||
|
||
module Test_callback = struct | ||
external call_cb : Wolf.t -> ((Wolf.t) -> (Animal.t)) -> Animal.t = "call_cb" | ||
type 'a t' = ([> tags ] as 'a) Ocaml_rs_smartptr.Rusty_obj.t | ||
type t = tags t' | ||
|
||
external create : string -> _ t' = "wolf_create" | ||
external set_hungry : _ t' -> bool -> unit = "wolf_set_hungry" | ||
end | ||
|
||
module Test_callback = struct | ||
external call_cb : _ Wolf.t' -> (_ Wolf.t' -> _ Animal.t') -> _ Animal.t' = "call_cb" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters