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:
Art Yerkes 2004-10-17 08:38:54 +00:00
commit e9160c8597
4 changed files with 83 additions and 53 deletions

View file

@ -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*/