PageRenderTime 107ms CodeModel.GetById 27ms app.highlight 28ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/rel-1.3.35/Lib/tcl/tclresult.i

#
Swig | 30 lines | 4 code | 3 blank | 23 comment | 0 complexity | fc535c2faae35261efc358ec063b141c MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
 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}