1 /* -----------------------------------------------------------------------------
2  * tclresult.i
3  * ----------------------------------------------------------------------------- */
4 
5 /*
6 int Tcl_Result
7 
8       Makes the integer return code of a function the return value
9       of a SWIG generated wrapper function.  For example :
10 
11             int foo() {
12                   ... do stuff ...
13                   return TCL_OK;
14             }
15 
16       could be wrapped as follows :
17 
18             %include typemaps.i
19             %apply int Tcl_Result { int foo };
20             int foo();
21 */
22 
23 // If return code is a Tcl_Result, simply pass it on
24 
25 %typemap(out) int Tcl_Result {
26   return $1;
27 }
28