Commits

camlspotter committed fa79e01

unsafe_extract

  • Participants
  • Parent commits 48e9216
  • Branches dev

Comments (0)

Files changed (1)

         **)
 
       external unsafe_embed : 'a -> _CObject t = "opycaml_embed_ocaml_value"
-	(** Unsafe: embed any OCaml value into Python's CObject. *)
+      (** Unsafe: embed any OCaml value into Python's CObject. *)
+
+      external unsafe_extract : _CObject t -> 'a = "opycaml_extract_embeded_ocaml_value"
+      (** Unsafe: extract an OCaml value from Python's CObject. 
+          EXTREMELY UNSAFE OPERATION. UNTESTED. BAD IDEA.
+          TRY AVOID USING THIS. THINK TWICE WHY YOU NEED THIS. 
+      *)
 
       external embed_closure : ([> _Tuple] t -> _Object t) -> _Closure t = "opycaml_create_closure_wrap"
 	(** Embed an OCaml function of type [[> _Tuple] t -> _Object t] to a Python object *)