|
Teuchos Package Browser (Single Doxygen Collection)
Version of the Day
|
00001 #include "Teuchos_CWrapperSupport_Cpp.hpp" 00002 #include "Teuchos_Assert.hpp" 00003 00004 00005 extern "C" { 00006 00007 00008 int someCFunc(int input, int *ierr) 00009 { 00010 int output = -1; 00011 TEUCHOS_CWRAPPER_TRY(ierr) { 00012 TEUCHOS_ASSERT_INEQUALITY(input, >=, 0); 00013 if (input > 10) { 00014 TEUCHOS_CWRAPPER_SET_ERROR_CODE(ierr, -2); 00015 } 00016 else { 00017 output = input; 00018 } 00019 } TEUCHOS_CWRAPPER_CATCH_ERROR_CODE(ierr); 00020 return output; 00021 } 00022 00023 00024 } // extern "C"
1.7.6.1