1/* -----------------------------------------------------------------------------
2 * See the LICENSE file for information on copyright, usage and redistribution
3 * of SWIG, and the README file for authors - http://www.swig.org/release.html.
4 *
5 * tclresult.i
6 * ----------------------------------------------------------------------------- */
7
8/*
9int Tcl_Result
10
11      Makes the integer return code of a function the return value
12      of a SWIG generated wrapper function.  For example :
13
14            int foo() {
15                  ... do stuff ...
16                  return TCL_OK;
17            }
18
19      could be wrapped as follows :
20
21            %include typemaps.i
22            %apply int Tcl_Result { int foo };
23            int foo();
24*/
25
26// If return code is a Tcl_Result, simply pass it on
27
28%typemap(out) int Tcl_Result {
29  return $1;
30}
31