Updated documentation.
Provide a swig_val function which generates a shareable value from a module specific one in a painless way. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6408 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
db57b0d6d8
commit
e9160c8597
4 changed files with 83 additions and 53 deletions
|
|
@ -12,6 +12,17 @@
|
|||
/* Type registration */
|
||||
%insert(init) "typeregister.swg"
|
||||
|
||||
%insert(mlitail) %{
|
||||
val swig_val : c_enum_type -> c_obj -> Swig.c_obj
|
||||
%}
|
||||
|
||||
%insert(mltail) %{
|
||||
let swig_val t v =
|
||||
match v with
|
||||
C_enum e -> enum_to_int t v
|
||||
| _ -> Obj.magic v
|
||||
%}
|
||||
|
||||
/*#ifndef SWIG_NOINCLUDE*/
|
||||
%insert(runtime) "ocaml.swg"
|
||||
/*#endif*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue