tclresult.i 684 B

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