PageRenderTime 38ms CodeModel.GetById 15ms RepoModel.GetById 0ms 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. int Tcl_Result
  9. Makes the integer return code of a function the return value
  10. of a SWIG generated wrapper function. For example :
  11. int foo() {
  12. ... do stuff ...
  13. return TCL_OK;
  14. }
  15. could be wrapped as follows :
  16. %include typemaps.i
  17. %apply int Tcl_Result { int foo };
  18. int foo();
  19. */
  20. // If return code is a Tcl_Result, simply pass it on
  21. %typemap(out) int Tcl_Result {
  22. return $1;
  23. }