Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. SWIG_AsVal_float (PyObject * obj, float *val)
  2. {
  3. double v;
  4. int res = SWIG_AsVal_double (obj, &v);
  5. if (SWIG_IsOK(res)) {
  6. if (SWIG_Float_Overflow_Check(v)) {
  7. return SWIG_OverflowError;
  8. } else {
  9. if (val) *val = static_cast< float >(v);
  10. }
  11. }
  12. return res;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement