| 2471 | #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) |
| 2472 | |
| 2473 | SWIGRUNTIME int |
| 2474 | SWIG_Python_AddErrMesg(const char* mesg, int infront) |
| 2475 | { |
| 2476 | if (PyErr_Occurred()) { |
| 2477 | PyObject *type = 0; |
| 2478 | PyObject *value = 0; |
| 2479 | PyObject *traceback = 0; |
| 2480 | PyErr_Fetch(&type, &value, &traceback); |
| 2481 | if (value) { |
| 2482 | PyObject *old_str = PyObject_Str(value); |
| 2483 | const char *tmp = SWIG_Python_str_AsChar(old_str); |
| 2484 | const char *errmesg = tmp ? tmp : "Invalid error message"; |
| 2485 | Py_XINCREF(type); |
| 2486 | PyErr_Clear(); |
| 2487 | if (infront) { |
| 2488 | PyErr_Format(type, "%s %s", mesg, errmesg); |
| 2489 | } else { |
| 2490 | PyErr_Format(type, "%s %s", errmesg, mesg); |
| 2491 | } |
| 2492 | SWIG_Python_str_DelForPy3(tmp); |
| 2493 | Py_DECREF(old_str); |
| 2494 | } |
| 2495 | return 1; |
| 2496 | } else { |
| 2497 | return 0; |
| 2498 | } |
| 2499 | } |
| 2500 | |
| 2501 | SWIGRUNTIME int |
| 2502 | SWIG_Python_ArgFail(int argnum) |
no test coverage detected